在 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