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
Display a Part of the Webpage on the Webview Android
Android - Build Separate APKs for Different Processor Architectures
Single Click and Double Click of a Button in Android
Cannot Resolve Mapactivity Class on Android
Display Unity Scene as Sub View in Android Studio
How to Display Map (Google) on a Phonegap Android Application
How to Move Main Content with Drawer Layout Left Side
How to Scroll to Top of Long Scrollview Layout
Scale Fit Mobile Web Content Using Viewport Meta Tag
Display Fb Profile Pic in Circular Image View in Application
Gradle Duplicate Entry: Java.Util.Zip.Zipexception
How to Use Sharedpreferences to Save More Than One Values
Limitation on Texture Size? Android Open Gl Es 2.0
How to Clear Specific Activity from the Stack History
Mvvmcross Changing Viewmodel Within a Mvxbindablelistview
Batch Scripting - If Exist ./Sdcard/File.Any Using Adb
Differencebetween the States Selected, Checked and Activated in Android