npomfret / react-native-image-tools

Image editing software powered by Abode Creative SDK for iOS and Android.
171 stars 41 forks source link

Multidex error on android #8

Open srameshr opened 7 years ago

srameshr commented 7 years ago
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 commented 7 years ago

Looks like you're missing an import.

srameshr commented 7 years ago

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 commented 7 years ago

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

srameshr commented 7 years ago

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

flyandi commented 7 years ago

Did anyone resolve this issue?

anniewey commented 7 years ago

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 commented 6 years ago

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