java.util.zip.ZipException:重复条目:com/google/android/gms/location/places/zzl.class
java.util.zip.ZipException: duplicate entry: com/google/android/gms/location/places/zzl.class
我在我的设备中 运行 我的项目时遇到了这个问题,请注意,此错误在 gradle 同步期间不会出现,但只会在我 运行 项目时出现。
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/location/places/zzl.class
这是我的 app/build gradle:
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "il.co.dotech.constinspect"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.schibstedspain.android:leku:2.3.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.firebase:firebase-storage:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.google.android.gms:play-services-auth:11.8.0'
compile 'com.google.android.gms:play-services-maps:11.8.0'
compile 'com.google.android.gms:play-services-location:11.8.0'
//compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.facebook.android:facebook-android-sdk:4.26.0'
compile'com.android.support:support-v4:25.3.1'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile'com.android.support:recyclerview-v7:25.0.0'
compile 'com.github.medyo:fancybuttons:1.8.2'
compile 'com.github.Mariovc:ImagePicker:1.0.4'
compile 'com.github.clans:fab:1.6.4'
compile 'com.squareup.okhttp3:okhttp:3.4.2'
compile 'org.json:json:20160212'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
compile'com.daimajia.swipelayout:library:1.2.0@aar'
compile 'com.mobsandgeeks:android-saripaar:2.0.3'
compile 'com.mikepenz:actionitembadge:3.3.1@aar'
compile 'com.mikepenz:iconics-core:2.8.1@aar'
compile 'com.mikepenz:fontawesome-typeface:4.7.0.0@aar'
testCompile 'junit:junit:4.12'
compile files('libs/gson-1.7.1.jar')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
}
apply plugin: 'com.google.gms.google-services'
这是我的构建 gradle:
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.google.gms:google-services:3.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
尝试在您的 app/build gradle
依赖项中添加此行:
compile 'com.google.android.gms:play-services-places:11.8.0'
我在我的设备中 运行 我的项目时遇到了这个问题,请注意,此错误在 gradle 同步期间不会出现,但只会在我 运行 项目时出现。
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/location/places/zzl.class
这是我的 app/build gradle:
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "il.co.dotech.constinspect"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.schibstedspain.android:leku:2.3.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.firebase:firebase-storage:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.google.android.gms:play-services-auth:11.8.0'
compile 'com.google.android.gms:play-services-maps:11.8.0'
compile 'com.google.android.gms:play-services-location:11.8.0'
//compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.facebook.android:facebook-android-sdk:4.26.0'
compile'com.android.support:support-v4:25.3.1'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile'com.android.support:recyclerview-v7:25.0.0'
compile 'com.github.medyo:fancybuttons:1.8.2'
compile 'com.github.Mariovc:ImagePicker:1.0.4'
compile 'com.github.clans:fab:1.6.4'
compile 'com.squareup.okhttp3:okhttp:3.4.2'
compile 'org.json:json:20160212'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
compile'com.daimajia.swipelayout:library:1.2.0@aar'
compile 'com.mobsandgeeks:android-saripaar:2.0.3'
compile 'com.mikepenz:actionitembadge:3.3.1@aar'
compile 'com.mikepenz:iconics-core:2.8.1@aar'
compile 'com.mikepenz:fontawesome-typeface:4.7.0.0@aar'
testCompile 'junit:junit:4.12'
compile files('libs/gson-1.7.1.jar')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
}
apply plugin: 'com.google.gms.google-services'
这是我的构建 gradle:
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.google.gms:google-services:3.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
尝试在您的 app/build gradle
依赖项中添加此行:
compile 'com.google.android.gms:play-services-places:11.8.0'