Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multidex error on android #8

Open
srameshr opened this issue Jul 15, 2017 · 7 comments
Open

Multidex error on android #8

srameshr opened this issue Jul 15, 2017 · 7 comments

Comments

@srameshr
Copy link

MainApplication.java:46: error: cannot find symbol
    MultiDex.install(getBaseContext());
    ^
  symbol:   variable MultiDex
  location: class MainApplication

This is my MainAppllication.java file:

@Override
  public void onCreate() {
    super.onCreate();
    MultiDex.install(getBaseContext());
    AdobeCSDKFoundation.initializeCSDKFoundation(getApplicationContext());
    SoLoader.init(this, /* native exopackage */ false);
  }
@npomfret
Copy link
Owner

Looks like you're missing an import.

@srameshr
Copy link
Author

I just removed this line MultiDex.install(getBaseContext()); and it works fine. Will I run into trouble later? I have no idea about native java code.

@npomfret
Copy link
Owner

You app won't start if DEXing is an issue, but it's easy enough to overcome.

@srameshr
Copy link
Author

Il go over this again and update this thread if I manage to fix my issue in a proper way.

@flyandi
Copy link
Contributor

flyandi commented Aug 9, 2017

Did anyone resolve this issue?

@anniewey
Copy link

anniewey commented Sep 29, 2017

Followed the install instructions and faced the same issue. As what the contributor said, an import is missing. Install.md did not include the import for the multidex so you will need to add that by yourself.

@flyandi Add this to your MainApplication.java and it will works:
import android.support.multidex.MultiDex;

@nwaughachukwuma
Copy link

nwaughachukwuma commented Oct 12, 2018

Remember to also pull in Context: import android.content.Context; for the attachBaseContext(Context base) method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants