ZipException: transform duplicate entry com/google/android/gms/internal/zzez.class


ZipException: transform duplicate entry com/google/android/gms/internal/zzez.class



When I try to build APK, there is this message :



Error:Execution failed for task
':app:transformClassesWithJarMergingForDebug'.



com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry:
com/google/android/gms/internal/zzez.class



but when I try to debug app this working.



I has delete the .gradle directory but without success.



This is my build.gradle app file:


buildscript {
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'me.tatarka:gradle-retrolambda:3.2.2'
classpath 'io.fabric.tools:gradle:1.21.4'
}
}

apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'

android {
compileSdkVersion 24
buildToolsVersion '26.0.2'

packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory'
exclude 'META-INF/NOTICE'
}

aaptOptions {
useNewCruncher false
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

useLibrary 'org.apache.http.legacy'

defaultConfig {
applicationId "com.DringMe.launcher.fr"
minSdkVersion 19
targetSdkVersion 23
multiDexEnabled true
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}

repositories {
maven {
url 'http://repo.appspanel.com/appspanel-sdk-android/'
}
maven {
url 'https://jitpack.io'
}
}

dexOptions {
incremental true
javaMaxHeapSize "3g"
}
dependencies {
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.retrofit:converter-simplexml:1.9.0'

compile 'com.jakewharton:butterknife:7.0.1'
// annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'


//noinspection GradleCompatible
compile 'com.android.support:design:24.2.1'
//noinspection GradleCompatible
compile 'com.google.android.gms:play-services-location:11.6.0'
compile 'com.google.android.gms:play-services-maps:11.6.0'
compile 'io.reactivex:rxandroid:1.0.1'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.pkmmte.view:circularimageview:1.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.github.sd6352051.niftydialogeffects:niftydialogeffects:1.0.0@aar'
compile 'com.hannesdorfmann.smoothprogressbar:library:1.0.0'
compile 'com.github.castorflex.smoothprogressbar:library-circular:1.0.0'

compile files('src/main/libs/edm.jar')
compile files('src/main/libs/rc.jar')
compile files('src/main/libs/cdm.jar')
compile files('src/main/libs/license.jar')
compile files('src/main/libs/knox.jar')


compile 'com.github.arimorty:floatingsearchview:2.0.3'
//noinspection GradleDependency
compile 'com.google.maps.android:android-maps-utils:0.4+'
//noinspection GradleDependency
compile 'com.akexorcist:googledirectionlibrary:1.0.4'
compile project(':slideDateTimePicker-release')
compile 'me.biubiubiu.justifytext:library:1.1'
//noinspection GradleDependency
compile 'com.android.support:multidex:1.0.1'


compile project(':AppsPanelSDK')
// compile 'com.appspanel.android:sdk:4.4.2'
}
}

configurations {
compile.exclude group: 'stax'
compile.exclude group: 'xpp3'
}

dependencies {
compile project(':SmartAdServer-Android-SDK-6.7.1')
// compile project(':AppsPanelSDK')

}



I don't know why it does that and I am stuck.



I need to help please!!



Thanks.





Just a sidenote, some of your dependencies use really old versions, e.g. support library, retrofit, etc.
– LieForBananas
Jun 28 at 12:06





upgrade all your libraries to the latest version and also replace compile with implementation
– Paraskevas Ntsounos
Jun 28 at 12:20





I try to upgrade all libraries and replace compile by implementataion by it doesn't working.
– Fanny BATCHO
Jun 28 at 14:07




2 Answers
2



Finally, I solved my problem more or less:



I replace


compile 'com.google.android.gms:play-services-location:11.6.0'
compile 'com.google.android.gms:play-services-maps:11.6.0'



To


compile 'com.google.android.gms:play-services-location:11.0.4'
compile 'com.google.android.gms:play-services-maps:11.0.4'


ext.googleServicesVersion = '11.8.0'
implementation "com.google.android.gms:play-services-location:$googleServicesVersion"





Could you add a little bit of an explanation on why this should solve the problem stated in the question?
– anothernode
Jun 29 at 10:07






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Export result set on Dbeaver to CSV

Opening a url is failing in Swift