您的位置:首页 > 其它

Unable to execute dex: method ID not in [0, 0xffff]: 65536

2015-09-08 20:06 302 查看
原因:http://ingramchen.io/blog/2014/09/prevention-of-android-dex-64k-method-size-limit.html

android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
//开启multidex模式,越过dex文件不能超过65536的限制
multiDexEnabled true

}

dependencies {
compile 'com.android.support:multidex:'

如果没有自定义application,则在AndroidManifest.xml的<appliation>节点配置android:name="android.support.multidex.MultiDexApplication"

如果定义了application,则继承
android.support.multidex.MultiDexApplication
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: