Multiple Dex Files Define Lcom/Google/Android/Gms/Internal/Zzau

Multiple dex files define Lcom/google/android/gms/internal/zzau

I had similar problem and your question helped me solve mine and probably will help you solve yours. Problem is that you have defined:

dependencies {
...
compile 'com.google.android.gms:play-services-cast:7.5.0'
}

and

dependencies {
...
compile 'com.google.android.gms:play-services:7.0.+'
...
}

Since google services 7.5.0, if you're using single modules from play services you can't use whole play services as dependency simultaneously. Solution is to select only those services that you need instead of whole package e.g.:

instead of

dependencies {
...
compile 'com.google.android.gms:play-services:7.0.+'
...
}

use

dependencies {
...
compile 'com.google.android.gms:play-services-maps:7.0.+'
compile 'com.google.android.gms:play-services-location:7.0.+'
compile 'com.google.android.gms:play-services-gcm:7.0.+'
...
}

Also I'm not sure but probably it would be good idea to use the same version of google services in both gradle configs.

Multiple dex files define Lcom/google/android/gms/common/internal/zzag

Do One thing,

In your app level gradle, comment this line and try.

compile fileTree(dir: 'libs', include: ['*.jar'])

Android Multiple dex files define Lcom/google/android/gms/common/api/zza

Move this:

apply plugin: 'com.google.gms.google-services'

to the bottom of your app/build.gradle file.

com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/config/zzao;

Running the following commands in that order fixed the issue for me:

cordova plugin rm cordova-plugin-compat --force --save
cordova plugin add cordova-plugin-compat@1.2 --save
rm -rf ~/.gradle/caches/*
cd platforms/android -> gradlew clean

Multiple dex files define in Google Play Services

I am not sure about the reason, but adding Google Admob library plugin the build was successful.

NOTE: I am using cordova plugin for Admob.

Android studio gradle complie time error

You need to enable multidex add these lines in app level build.gradle

android {
compileSdkVersion 23
buildToolsVersion '23.0.0'

defaultConfig {
applicationId "com.wowio.ebookreader"
minSdkVersion 14
targetSdkVersion 21
multiDexEnabled true

}

dexOptions {
javaMaxHeapSize "4g"
}
}

and add this dependency

 dependencies {

compile 'com.android.support:multidex:1.0.1'

}


Related Topics



Leave a reply



Submit