我在设备中运行项目时遇到此问题,请注意,在Gradle sync期间,此错误不会显示,但只有在我运行项目时才会显示。
错误:任务':app:transformClassesWithJarMergingForDebug'执行失败。 com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / google / android / gms / location / places / zzl.class
这是我的app / build 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
}
这是我的构建gradle:
{{1}}
答案 0 :(得分:0)
尝试在app/build gradle
依赖项中添加此行:
compile 'com.google.android.gms:play-services-places:11.8.0'