【问题标题】:ZipException: duplicate entry: com/google/android/gms/internal/zzbtt.classZipException:重复条目:com/google/android/gms/internal/zzbtt.class
【发布时间】:2017-12-28 07:30:32
【问题描述】:

错误:任务 ':app:transformClassesWithJarMergingForDebug' 执行失败。

com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com/google/android/gms/internal/zzbtt.class

【问题讨论】:

  • 显示build.gradle
  • 请确保所有 Firebase 和 Google Play 服务的版本完全相同
  • 我附上了一张图片,显示了我使用的依赖项
  • 您的 firebase 和 playservices 是不同的版本。使它们具有相同的版本。检查这个stackoverflow.com/questions/38200664/…
  • 请将您的 Gradle 文件添加为文本,请

标签: android android-gradle-plugin


【解决方案1】:
  1. 请确保所有 Firebase 和 Google Play 服务的版本完全相同(例如 11.0.2)

  2. 有关 Firebase 11.0.2 使用的正确版本表,请参阅 FirebaseUi github

  3. 不相关,但您的 Volley 库依赖项已被弃用(请参阅相应的 Github 页面)。同样,如果使用 Apache HTTP 库,则不需要 Volley

【讨论】:

    【解决方案2】:

    这帮助我./gradlew :app:dependencies 你会看到你所有的依赖是这样的:

    |    +--- com.google.android.gms:play-services-gcm:+ -> 11.0.4
    |  |    +--- com.google.android.gms:play-services-analytics:+ -> 11.0.4
    |    \--- com.google.android.gms:play-services-location:+ -> 11.8.0
    

    你必须找到错误的版本。就我而言,它是location:+ -> 11.8.0 我像这样在app/build.gradle 中修复它

    compile('com.google.android.gms:play-services-location:11.0.4') {
       force = true;
    }
    

    【讨论】:

      猜你喜欢
      • 2018-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多