【问题标题】:java.util.zip.ZipException: duplicate entry errorjava.util.zip.ZipException:重复输入错误
【发布时间】:2017-07-09 13:07:21
【问题描述】:

这是我的 build.gradle 依赖部分: `

依赖{

compile fileTree(include: ['*.jar'], dir: 'libs')

compile 'com.android.support:appcompat-v7:23.0.0'
compile files('libs/google-play-services.jar')

compile files('libs/android-async-http-1.4.9.jar')
compile 'cz.msebera.android:httpclient:4.3.6'
compile 'com.google.android.gms:play-services-location:7.+'

我的错误是: 错误:任务 ':app:packageAllDebugClassesForMultiDex' 执行失败。

java.util.zip.ZipException:重复条目:com/google/android/gms/auth/UserRecoverableAuthException.class

错误的原因是什么??

【问题讨论】:

    标签: java android


    【解决方案1】:

    您在 gradle 文件中添加了两次 google-play-services。

    compile files('libs/google-play-services.jar') 
    compile 'com.google.android.gms:play-services-location:7.+' 
    

    从您的 build.gradle 文件中删除以下行。

    compile files('libs/google-play-services.jar')
    

    【讨论】:

    • 从 libs 目录中移除 google-play-services.jar
    【解决方案2】:

    你需要在项目link中使用multidex

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-09
      • 1970-01-01
      • 2018-04-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多