MultiDex NoClassDefFound error

后端 未结 8 870
醉梦人生
醉梦人生 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:23

    I tried with a lot of solutions a no one worked for me. Finally, I found this:

        public class MyApplication extends Application {
        @Override
        protected void attachBaseContext(Context base) {
            super.attachBaseContext(base);
            MultiDex.install(this);
        }
    }
    

    And was the only solution for my problem. Maybe someone is having the same problem and this could help :)

提交回复
热议问题