MultiDex NoClassDefFound error

后端 未结 8 811
醉梦人生
醉梦人生 2020-11-29 05:52

I have converted my application into MultiDex to bear with 64k dex limit. Now it looks like this:

public class App extends MultiDexApplication {

private App         


        
8条回答
  •  抹茶落季
    2020-11-29 06:33

    If you're extending the MultiDexApplication you don't need to make the MultiDex.install(context) call as it's already happening (see source link). If you need to use attachBaseContext then just make sure to call super.attachBaseContext(context).

    https://android.googlesource.com/platform/frameworks/multidex/+/1bb1ab007f6b9405227ea4ce07d2061e4dbb6fe0/library/src/android/support/multidex/MultiDexApplication.java

    We just updated developers.android.com with instructions on how to use the support library with the Android gradle plugin including an development optimization for quick development build cycle times.

    https://developer.android.com/tools/building/multidex.html

提交回复
热议问题