我有这个错误
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK com/j256/ormlite/core/LICENSE.txt
File1: ../.gradle/caches/modules-2/files-2.1/com.j256.ormlite/ormlite-core/4.48/e579bd2905d0399af5029aaaf9817d5fa0ca88a5/ormlite-core-4.48.jar
File2: ../utils-lib/build/intermediates/bundles/default/classes.jar
File3: ../networking-lib/build/intermediates/bundles/default/classes.jar
答案 0 :(得分:2)
添加到build.gradle:
packagingOptions {
exclude '**/LICENSE.txt'
exclude 'pom.xml'
}
但您可以仅排除com/j256/ormlite/core/LICENSE.txt
而不是所有LICENSE.txt
个文件
答案 1 :(得分:0)
试试这个
exclude 'META-INF/ASL2.0'