wuyunqiang / ReactNativeUtil

30 stars 6 forks source link

Dex: Error converting bytecode to dex: Cause: com.android.dex.DexIndexOverflowException: Cannot merge new index 65947 into a non-jumbo instruction! #15

Open wuyunqiang opened 6 years ago

wuyunqiang commented 6 years ago

android 方法数超过64K 解决方法: 1:app/build.gradle

compile'com.android.support:multidex:1.0.0'

2:

 defaultConfig {
        multiDexEnabled true
    }

3:在application里面

  @Override
  protected void attachBaseContext(Context base) {
    super.attachBaseContext(base);
    MultiDex.install(this);
  }

will be ok.