原因: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