In my application I want use compile 'com.google.android.gms:play-services-gcm:10.2.1'
but when running application show me this error in Logcat :
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
I added multiDexSupport
with this code but not work me and again show me this error!
Codes for multiDex:
//Build.gradle
defaultConfig {
applicationId "com.tellfa.colony"
minSdkVersion 15
targetSdkVersion 26
versionCode 12
versionName "22"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
// MultiDex
compile 'com.android.support:multidex:1.0.2'
//Application class
@Override
protected void attachBaseContext(Context context) {
super.attachBaseContext(context);
MultiDex.install(this);
}
How can I fix it? please help me