My code was working fine and then i suddenly get an error
Multiple dex files define Lcom/google/android/gms/internal/zzim;
I looked around and saw it was because of multiple dependencies using same classes, but nothing changed and the code worked fine before.
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.app.app.app"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
aaptOptions {
noCompress 'png' , 'gif'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-analytics:8.3.0'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services-ads:8.3.0'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.flipboard:bottomsheet-core:1.5.0'
compile 'com.flipboard:bottomsheet-commons:1.5.0'
compile 'com.facebook.android:audience-network-sdk:4.+'
compile 'com.facebook.fresco:fresco:0.9.0+'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile files('libs/universal-image-loader-1.9.5.jar')
compile files('libs/cwac-provider-0.3.1.jar')
}
gradlew androidDependencies output
google-services plugin could not detect any version for com.google.android.gms, default version: 8.3.0 will be used.
please apply google-services plugin at the bottom of the build file.
Incremental java compilation is an incubating feature.
:app:androidDependencies
debug
+--- LOCAL: cwac-provider-0.3.1.jar
+--- LOCAL: universal-image-loader-1.9.5.jar
+--- com.google.android.gms:play-services-measurement:8.3.0
| \--- com.google.android.gms:play-services-basement:8.4.0
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.google.android.gms:play-services-analytics:8.3.0
| \--- com.google.android.gms:play-services-basement:8.4.0
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.android.support:appcompat-v7:23.1.1
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.google.android.gms:play-services-ads:8.4.0
| \--- com.google.android.gms:play-services-basement:8.4.0
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.android.support:design:23.1.1
| +--- com.android.support:appcompat-v7:23.1.1
| | \--- com.android.support:support-v4:23.1.1
| | \--- LOCAL: internal_impl-23.1.1.jar
| +--- com.android.support:recyclerview-v7:23.1.1
| | \--- com.android.support:support-v4:23.1.1
| | \--- LOCAL: internal_impl-23.1.1.jar
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.flipboard:bottomsheet-core:1.5.0
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.flipboard:bottomsheet-commons:1.5.0
| +--- com.flipboard:bottomsheet-core:1.5.0
| | \--- com.android.support:support-v4:23.1.1
| | \--- LOCAL: internal_impl-23.1.1.jar
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.facebook.android:audience-network-sdk:4.12.1
| +--- com.android.support:appcompat-v7:23.1.1
| | \--- com.android.support:support-v4:23.1.1
| | \--- LOCAL: internal_impl-23.1.1.jar
| +--- com.google.android.gms:play-services-ads:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.1.1
| | \--- LOCAL: internal_impl-23.1.1.jar
| \--- com.android.support:recyclerview-v7:23.1.1
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
\--- com.facebook.fresco:fresco:0.9.0
+--- com.facebook.fresco:drawee:0.9.0
| +--- com.android.support:support-v4:23.1.1
| | \--- LOCAL: internal_impl-23.1.1.jar
| \--- com.facebook.fresco:fbcore:0.9.0
+--- com.facebook.fresco:fbcore:0.9.0
\--- com.facebook.fresco:imagepipeline:0.9.0
+--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.facebook.fresco:fbcore:0.9.0
\--- com.facebook.fresco:imagepipeline-base:0.9.0
+--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
\--- com.facebook.fresco:fbcore:0.9.0
debugAndroidTest
No dependencies
debugUnitTest
No dependencies
release
+--- LOCAL: cwac-provider-0.3.1.jar
+--- LOCAL: universal-image-loader-1.9.5.jar
+--- com.google.android.gms:play-services-measurement:8.3.0
| \--- com.google.android.gms:play-services-basement:8.4.0
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.google.android.gms:play-services-analytics:8.3.0
| \--- com.google.android.gms:play-services-basement:8.4.0
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.android.support:appcompat-v7:23.1.1
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.google.android.gms:play-services-ads:8.4.0
| \--- com.google.android.gms:play-services-basement:8.4.0
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.android.support:design:23.1.1
| +--- com.android.support:appcompat-v7:23.1.1
| | \--- com.android.support:support-v4:23.1.1
| | \--- LOCAL: internal_impl-23.1.1.jar
| +--- com.android.support:recyclerview-v7:23.1.1
| | \--- com.android.support:support-v4:23.1.1
| | \--- LOCAL: internal_impl-23.1.1.jar
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.flipboard:bottomsheet-core:1.5.0
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.flipboard:bottomsheet-commons:1.5.0
| +--- com.flipboard:bottomsheet-core:1.5.0
| | \--- com.android.support:support-v4:23.1.1
| | \--- LOCAL: internal_impl-23.1.1.jar
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.facebook.android:audience-network-sdk:4.12.1
| +--- com.android.support:appcompat-v7:23.1.1
| | \--- com.android.support:support-v4:23.1.1
| | \--- LOCAL: internal_impl-23.1.1.jar
| +--- com.google.android.gms:play-services-ads:8.4.0
| | \--- com.google.android.gms:play-services-basement:8.4.0
| | \--- com.android.support:support-v4:23.1.1
| | \--- LOCAL: internal_impl-23.1.1.jar
| \--- com.android.support:recyclerview-v7:23.1.1
| \--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
\--- com.facebook.fresco:fresco:0.9.0
+--- com.facebook.fresco:drawee:0.9.0
| +--- com.android.support:support-v4:23.1.1
| | \--- LOCAL: internal_impl-23.1.1.jar
| \--- com.facebook.fresco:fbcore:0.9.0
+--- com.facebook.fresco:fbcore:0.9.0
\--- com.facebook.fresco:imagepipeline:0.9.0
+--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
+--- com.facebook.fresco:fbcore:0.9.0
\--- com.facebook.fresco:imagepipeline-base:0.9.0
+--- com.android.support:support-v4:23.1.1
| \--- LOCAL: internal_impl-23.1.1.jar
\--- com.facebook.fresco:fbcore:0.9.0
releaseUnitTest
No dependencies