Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Hello i am getting the above error please resolve.
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Hello i am getting the above error please resolve.
1) Add multiDexEnabled true as mention below in app Gradle.
android {
defaultConfig {
multiDexEnabled true
}
}
2) Add the dependency
compile 'com.android.support:multidex:1.0.1'
3) call below method in application class
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
Hope it will help you !!!
Try this code in Gradle:
android {
defaultConfig {
multiDexEnabled true
}
}
Add below code in app level gradle file..
defaultConfig {
multiDexEnabled true
}
here you Please Update your build.gradle. and add multidex enable in gadel file. android { compileSdkVersion 22 buildToolsVersion "23.0.0"
defaultConfig {
minSdkVersion 14 //lower than 14 doesn't support multidex
targetSdkVersion 22
// Enabling multidex support.
multiDexEnabled true
}
}
dependencies { compile 'com.android.support:multidex:1.0.3' }`
First Clean your project and build project after
Add multiDexEnabled true to your build.gradle
android {
compileSdkVersion xx
defaultConfig {
...
minSdkVersion xx //make sure your minSDK greater than 14
targetSdkVersion xx
multiDexEnabled true
...
}
}
finally add dependancy
compile 'com.android.support:multidex:1.0.1'