1.导入依赖库
dependencies {
compile ‘com.android.support:multidex:1.0.0‘
}
2.修改Gradle的build如下:
android {
compileSdkVersion 21
buildToolsVersion “21.1.0”
defaultConfig {
...
minSdkVersion 14
targetSdkVersion 21
...
// Enabling multidex support.
multiDexEnabled true//重点是这一句
}
...
}