android - duplicate entry error after adding google services -


i wanted add firebase 1 of app. integrated firebase according firebase offical documents. when tried "run" app. gives me warning

error:execution failed task ':app:transformclasseswithjarmergingfordebug'. com.android.build.api.transform.transformexception: java.util.zip.zipexception: duplicate entry: com/google/android/gms/internal/zzc.class

i removed firebase coding & removed gradle file. error still exist untill remove line

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

but unfortunately need google services work firebase. here app gradle file

 apply plugin: 'com.android.application'  android {     compilesdkversion 23     buildtoolsversion '23.0.3'      defaultconfig {         applicationid ""         minsdkversion 19         targetsdkversion 22         versioncode 15         versionname "2.01"         multidexenabled true     }      dexoptions {         predexlibraries = false     }     buildtypes {         release {             minifyenabled false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'         }     }      packagingoptions {         exclude 'meta-inf/license'         exclude 'meta-inf/license-firebase.txt'         exclude 'meta-inf/notice'     } }  dependencies {     compile filetree(include: ['*.jar'], dir: 'libs')     compile files('libs/main.jar')     compile 'com.android.support:appcompat-v7:23.2.1'     compile 'com.android.support:cardview-v7:23.0.+'     compile 'com.android.support:recyclerview-v7:23.0.+'     compile 'com.squareup.picasso:picasso:2.5.0'     compile 'com.commit451:nativestackblur:1.0.1'  compile 'com.google.firebase:firebase-analytics:9.0.0'     compile 'com.github.bumptech.glide:glide:3.6.1'     compile 'com.facebook.android:audience-network-sdk:4.11.0' } apply plugin: 'com.google.gms.google-services' 

here project gradle file

 buildscript {     repositories {         jcenter()     }     dependencies {         classpath 'com.android.tools.build:gradle:2.1.0'         classpath 'com.google.gms:google-services:3.0.0'          // note: not place application dependencies here; belong         // in individual module build.gradle files     } }  allprojects {     repositories {         jcenter()     } } 

the problem facebook audience network. once excluded google services worked fine. if having same problem change audience network dependency

   compile ('com.facebook.android:audience-network-sdk:4.11.0'){      exclude group: 'com.google.android.gms'  } 

Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -