Cannot fit requested classes in a single dex file (# methods: 148419 > 65536

app.gradle:

android {
    defaultConfig {
     ... multiDexEnabled
true } } dependencies {
... implementation ‘androidx.multidex:multidex:
2.0.1’ }

MyApplication.java:

MyApplication extends Application{

    @Override
    public void onCreate() {
        super.onCreate();
        MultiDex.install(this); // 初始化
    }
}

 

posted @ 2020-12-11 11:07  野生野鸡码农  阅读(211)  评论(0编辑  收藏  举报