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