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

来源:互联网 发布:linux运维工程师累吗 编辑:程序博客网 时间:2024/06/16 13:02


问题: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





阅读全文
0 0
原创粉丝点击