最近在工作中遇到了Too many method references: 70555; max is 65536:Finished with non-zero exit value 2的问题,是dex中的方法过多造成的,在stackOverflow上找到了解决的方法:
1) include it in dependencies:
dependencies {
...
compile 'com.android.support:multidex:1.0.0'
}
2) Enable it in your app:
defaultConfig {
...
minSdkVersion 14
targetSdkVersion 21
....
multiDexEnabled true
}