[Android Studio]解决Cannot merge new index 68383 into a non-jumbo instruction!的问题

xiaoxiao2021-02-28  179

问题:Cannot merge new index xxxxx into a non-jumbo instruction, 意味着方法数超过65536了

解决方法:

在 app的 build.gradle 里面,

为 android 下的 defaultConfig里面添加一项:

multiDexEnabled true 就可以搞定了 举例:

android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { applicationId "com.test.one" minSdkVersion 21 targetSdkVersion 23 multiDexEnabled true //Howard 2017-08-31 解决方法数超过65536的问题 versionName '1.0.5' testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" versionCode 5 } 其他略

详细请参考官方说明:

配置方法数超过 64K的应用:https://developer.android.com/studio/build/multidex.html

转载请注明原文地址: https://www.6miu.com/read-26992.html

最新回复(0)