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.

Shanmugapriyan
  • 953
  • 1
  • 10
  • 28
  • 1
    Possible duplicate of [Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'](http://stackoverflow.com/questions/34031395/errorexecution-failed-for-task-apptransformresourceswithmergejavaresfordebug) – Ankur Aggarwal Jan 06 '17 at 14:49

1 Answers1

0

add this to your app build.gradle into android block

packagingOptions {
    exclude 'META-INF/LICENSE'
}

May be after this you will be notified with similar problems related to other files. Keep excluding new files until you can build

firegloves
  • 5,581
  • 2
  • 29
  • 50