com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com/google/android/gms/iid/zzc.class
问题描述:
我正在制作一个应用程序,可以在其中编辑照片和videos.It还通过使用Recycler视图和卡片视图制作的时间线共享编辑过的照片。com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com/google/android/gms/iid/zzc.class
我每次尝试在Android SDK 22中运行我的应用程序时都出现错误,但它是Android SDK 23及更高版本中的工作文件。
任务':app:transformClassesWithJarMergingForDebug'的执行失败。
com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复的条目:COM /谷歌/安卓/ GMS/IID/zzc.class
它发生我也正在构建apk。
摇篮文件我的应用程序
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 25
buildToolsVersion '25.0.3'
defaultConfig {
applicationId "com.practice.android.moments"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [appPackageName: "${applicationId}"]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
jumboMode true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
/* 3)(Creative SDK) Exclude duplicate licenses */
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
//help
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/DEPENDENCIES'
pickFirst 'AndroidManifest.xml'
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.google.android.gms:play-services-auth:11.0.1'
compile 'com.google.firebase:firebase-core:11.0.1'
compile 'com.google.firebase:firebase-messaging:11.0.1'
compile 'com.google.firebase:firebase-auth:11.0.1'
compile 'com.google.firebase:firebase-database:11.0.1'
compile 'com.google.firebase:firebase-storage:11.0.1'
compile 'com.google.firebase:firebase-ads:11.0.1'
compile 'com.google.firebase:firebase-invites:11.0.1'
compile 'com.google.firebase:firebase-appindexing:11.0.1'
compile 'com.google.firebase:firebase-crash:11.0.1'
compile ('com.facebook.android:audience-network-sdk:4.11.0'){
exclude group: 'com.google.android.gms'
}
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.adobe.creativesdk.foundation:auth:0.9.1251'
compile 'com.adobe.creativesdk:image:4.8.4'
compile 'com.localytics.android:library:3.8.0'
testCompile 'junit:junit:4.12'}
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1'}
apply plugin: 'com.google.gms.google-services'
任何一个可以帮我...用于测试
魅族M2注意OS 5.1版棒棒糖API 22
电话Redmi Note 3 OS版本6.0.1棉花糖API 23
三星Note 5操作系统版本7.0牛轧糖API 24
答
在我的情况下,出现此错误是因为我有两个不同版本的google-play-service lib。 我删除其中之一,宾果! 尝试移动此编译 编译'com.google.android.gms:play-services-auth:11.0.1'
我试过了,但使用它我的谷歌身份验证将无法正常工作.. –