在 APK META-INF/maven/com.squareup/otto/pom.xml 中复制的重复文件 [英] Duplicate files copied in APK META-INF/maven/com.squareup/otto/pom.xml

查看:32
本文介绍了在 APK META-INF/maven/com.squareup/otto/pom.xml 中复制的重复文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行我的应用程序时,我遇到了下面提到的错误.

I'm getting below mentioned error when I'm trying to run my application.

错误:任务:app:transformResourcesWithMergeJavaResForAmazonCheezCoverage"的执行失败.

Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForAmazonCheezCoverage'.

com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: 在 APK META-INF/maven/com.squareup/otto/pom.xml 中复制的重复文件文件 1:/Users/afourtest/.gradle/caches/modules-2/files-2.1/com.crashlytics.android/crashlytics/1.1.13/e821eafa1bf489a26bdb71f95078c26785b37a1/crashlytics-1.1.1.文件 2:/Users/afourtest/.gradle/caches/modules-2/files-2.1/com.squareup/otto/1.3.7/69d90fd7fb70e54746e26c10454c220e40a775ce/otto-1.3.7.jar

com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.squareup/otto/pom.xml File1: /Users/afourtest/.gradle/caches/modules-2/files-2.1/com.crashlytics.android/crashlytics/1.1.13/e821eafa1bf489a26bdb71f95078c26785b37a1/crashlytics-1.1.13.jar File2: /Users/afourtest/.gradle/caches/modules-2/files-2.1/com.squareup/otto/1.3.7/69d90fd7fb70e54746e26c10454c220e40a775ce/otto-1.3.7.jar

我的应用 build.gradle 在这里

My app build.gradle is here

推荐答案

添加到 build.gradle:

Add to build.gradle:

android {
...
    packagingOptions {
         exclude 'META-INF/maven/com.squareup/otto/pom.xml'
}

此外,您可以使用 pickFirst

这篇关于在 APK META-INF/maven/com.squareup/otto/pom.xml 中复制的重复文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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