0

I can understand that there are some library files duplicate. But I am not able to locate and fix it!..

Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE
File1: /root/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.7.3/e250c11c1329c7b6b62442a9743befad78be553c/jackson-annotations-2.7.3.jar
File2: /root/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.7.2/84ffa765dd258dbab8695963c41308b054f3a1cb/jackson-databind-2.7.2.jar
File3: /root/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.7.3/1499b854ae9f370409792db5af1b552dc7d9682f/jackson-core-2.7.3.jar

The path /root/.gradle/caches/mod.... is showing my gradle location on my machine. I tried of deleting it. But If I sync my project again all the three gradle files are created locally.

4

1 回答 1

0

将此添加到您的应用程序 build.gradle 到 android 块中

packagingOptions {
    exclude 'META-INF/LICENSE'
}

可能在此之后,您将收到与其他文件相关的类似问题的通知。继续排除新文件,直到您可以构建

于 2017-01-06T15:16:08.893 回答