gradle - duplicate entry: com/google/android/gms/internal/zzaa.class after adding facebook sdk -
am getting error when trying generate release apk, after added facebook audience network sdk.
full error: execution failed task ':app:transformclasseswithjarmergingforrelease'. > com.android.build.api.transform.transformexception: java.util.zip.zipexception: duplicate entry: com/google/android/gms/internal/zzaa.class
here's gradle file:
buildscript { repositories { maven { url 'https://maven.fabric.io/public' } } dependencies { classpath 'io.fabric.tools:gradle:1.+' } } apply plugin: 'com.android.application' apply plugin: 'io.fabric' android { compilesdkversion 24 buildtoolsversion "23.0.2" defaultconfig { applicationid "com.coolcrazyapps.myapp" minsdkversion 15 targetsdkversion 21 versioncode 10 versionname "2.0" multidexenabled true } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } repositories { mavencentral() maven { url 'https://maven.fabric.io/public' } } dependencies { // support libraries // misc libraries compile filetree(dir: 'libs') compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') { transitive = true; } compile 'com.android.support:appcompat-v7:24.0.0' compile 'com.android.support:support-v13:24.0.0' compile 'com.android.support:support-v4:24.0.0' compile 'com.github.hotchemi:android-rate:0.4.1' compile('com.google.firebase:firebase-core:9.2.1') compile 'com.google.firebase:firebase-messaging:9.2.1' compile 'io.branch.sdk.android:library:1.+' compile 'com.android.support:design:24.0.0' compile('com.facebook.android:audience-network-sdk:4.13.0') { exclude group: 'com.google.firebase' } } apply plugin: 'com.google.gms.google-services'
here's output of ./gradlew app:dependencies
_releaseapk - ## internal use, not manually configure ## +--- com.android.support:multidex:1.0.1 +--- com.crashlytics.sdk.android:crashlytics:2.5.2 | +--- com.crashlytics.sdk.android:answers:1.3.2 | | \--- io.fabric.sdk.android:fabric:1.3.6 | +--- io.fabric.sdk.android:fabric:1.3.6 | +--- com.crashlytics.sdk.android:crashlytics-core:2.3.5 | | +--- com.crashlytics.sdk.android:answers:1.3.2 (*) | | \--- io.fabric.sdk.android:fabric:1.3.6 | \--- com.crashlytics.sdk.android:beta:1.1.3 +--- com.android.support:appcompat-v7:24.0.0 | +--- com.android.support:support-v4:24.0.0 | | \--- com.android.support:support-annotations:24.0.0 | +--- com.android.support:support-vector-drawable:24.0.0 | | \--- com.android.support:support-v4:24.0.0 (*) | \--- com.android.support:animated-vector-drawable:24.0.0 | \--- com.android.support:support-vector-drawable:24.0.0 (*) +--- com.android.support:support-v13:24.0.0 | \--- com.android.support:support-v4:24.0.0 (*) +--- com.android.support:support-v4:24.0.0 (*) +--- com.github.hotchemi:android-rate:0.4.1 +--- com.google.firebase:firebase-core:9.2.1 | \--- com.google.firebase:firebase-analytics:9.2.1 | +--- com.google.android.gms:play-services-basement:9.2.1 | | \--- com.android.support:support-v4:23.0.0 -> 24.0.0 (*) | +--- com.google.firebase:firebase-common:9.2.1 | | +--- com.google.android.gms:play-services-basement:9.2.1 (*) | | \--- com.google.android.gms:play-services-tasks:9.2.1 | | \--- com.google.android.gms:play-services-basement:9.2.1 (*) | \--- com.google.firebase:firebase-analytics-impl:9.2.1 | +--- com.google.android.gms:play-services-basement:9.2.1 (*) | +--- com.google.firebase:firebase-iid:9.2.1 | | +--- com.google.android.gms:play-services-basement:9.2.1 (*) | | \--- com.google.firebase:firebase-common:9.2.1 (*) | \--- com.google.firebase:firebase-common:9.2.1 (*) +--- com.google.firebase:firebase-messaging:9.2.1 | +--- com.google.android.gms:play-services-basement:9.2.1 (*) | +--- com.google.firebase:firebase-iid:9.2.1 (*) | \--- com.google.firebase:firebase-common:9.2.1 (*) +--- io.branch.sdk.android:library:1.+ -> 1.14.5 | +--- com.android.support:support-annotations:22.2.0 -> 24.0.0 | \--- io.branch.external.answersshim:answers-shim:0.0.4 +--- com.android.support:design:24.0.0 | +--- com.android.support:support-v4:24.0.0 (*) | +--- com.android.support:recyclerview-v7:24.0.0 | | +--- com.android.support:support-annotations:24.0.0 | | \--- com.android.support:support-v4:24.0.0 (*) | \--- com.android.support:appcompat-v7:24.0.0 (*) \--- com.facebook.android:audience-network-sdk:4.13.0 +--- com.android.support:appcompat-v7:23.1.0 -> 24.0.0 (*) +--- com.google.android.gms:play-services-ads:8.4.0 | \--- com.google.android.gms:play-services-basement:8.4.0 -> 9.2.1 (*) \--- com.android.support:recyclerview-v7:23.1.0 -> 24.0.0 (*)
in android studio, see zzaa files @ these places:
let me know how resolve this, , what's causing trouble.
this solved problem:
compile ('com.facebook.android:audience-network-sdk:4.13.0'){ exclude group: 'com.google.android.gms' }
Comments
Post a Comment