Java.util.zip.ZipException:重复条目:com/google/common/base/FinalizableReference.class [英] Java.util.zip.ZipException: duplicate entry: com/google/common/base/FinalizableReference.class

查看:91
本文介绍了Java.util.zip.ZipException:重复条目:com/google/common/base/FinalizableReference.class的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么出现此错误,在同步Gradle时不会发生,但是在运行项目时却出现此错误.

Why am getting this error it will not occurred when I sync the Gradle but when I'm running the project I am getting this error .

错误:任务':app:transformClassesWithJarMergingForRelease'的执行失败. > com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com/google/common/base/FinalizableReference.class

Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/common/base/FinalizableReference.class

我不知道是哪个依赖导致此错误,我的依赖是.

I don't know which dependency cause this error, My dependencies are .

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:appcompat-v7:25.3.1'
    compile 'com.android.support:support-v4:25.3.1'
    compile 'com.android.support:customtabs:25.3.1'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:percent:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.facebook.android:facebook-android-sdk:4.19.0'
    compile 'com.google.android.gms:play-services-auth:11.0.0'
    compile 'com.google.android.gms:play-services-location:11.0.0'
    compile 'com.google.android.gms:play-services-maps:11.0.0'
    compile 'com.google.android.gms:play-services-places:11.0.0'
    compile 'com.google.maps.android:android-maps-utils:0.3.4'
    compile 'io.nlopez.smartlocation:library:3.3.1'
    compile 'com.appeaser.sublimenavigationviewlibrary:sublimenavigationviewlibrary:0.0.1'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.slider:library:1.1.5@aar'
    compile 'com.afollestad:sectioned-recyclerview:0.4.1'
    compile 'com.github.medyo:fancybuttons:1.8.3'
    compile 'com.basgeekball:awesome-validation:2.0'
    compile 'com.github.michaelye.easydialog:easydialog:1.4'
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

修改

我发现播放服务依赖性导致了此问题.当我使用10.2.6而不是11.0.0应用正常运行时,我只是将依赖项更改为

I figured it out play service dependencies causing this problem. when I'm using 10.2.6 instead of 11.0.0 app is working perfectly, I just change dependecies to

compile 'com.google.android.gms:play-services-auth:10.2.6'
compile 'com.google.android.gms:play-services-location:10.2.6'
compile 'com.google.android.gms:play-services-maps:10.2.6'
compile 'com.google.android.gms:play-services-places:10.2.6'

但是我想使用最新版本的播放服务11.0.0,但这给了我上述问题.如何解决这个问题?任何帮助将不胜感激.

but I want to use latest version of play-services 11.0.0 but it gives me the above problem. How to resolve this problem? Any help would be appriciated Thanks.

推荐答案

最后解决了问题. google似乎是一个错误,已在更新版本中解决了这个问题.

Finally problem is solved. Seems like its a bug google resolved this issue in updated version.

使用播放服务版本11.0.1

在项目级别的gradle中使用

In project level gradle use

classpath 'com.google.gms:google-services:3.1.0'

这篇关于Java.util.zip.ZipException:重复条目:com/google/common/base/FinalizableReference.class的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆