Reputation:
Error
FAILURE: Build failed with an exception.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/analytics/internal/Command.class
I added the following dependencies
dependencies {
//compile 'com.google.android.gms:play-services:+'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-location:8.3.0'
compile files('libs/twitter4j-core-4.0.2.jar')
compile project(':devsmartAndroid')
compile project(':FacebookSDK')
compile project(':libPhotoView')
compile files('libs/android-support-v4.jar')
compile project(':library')
//compile 'com.google.android.gms:play-services-gcm:7.5.0'
//compile 'com.google.android.gms:play-services-analytics:7.5.0'
compile files('libs/gcm.jar')
compile files('libs/libGoogleAnalyticsServices.jar') }
Upvotes: 1
Views: 1540
Reputation: 75798
:app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/analytics/internal/Command.class
Problem is here
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-location:8.3.0'
You should call one Finally
compile 'com.google.android.gms:play-services:8.4.0'
Edit
I assume libGoogleAnalyticsServices.jar
creating Duplicate entry .
So you can comment just this jar
compile files('libs/libGoogleAnalyticsServices.jar')
Upvotes: 2
Reputation: 6855
In your Gradle
file there are two dependencies
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-location:8.3.0'
Instead of using both use only one
compile 'com.google.android.gms:play-services:8.4.0'
Because the play-services package is consolidated with all play services. otherwise add separately each one such as GCM,GA
,etc
Upvotes: 0