2

It's my first day with PubNub and I am trying to do the Hello World example (https://www.pubnub.com/docs/java/pubnub-java-sdk-v4). When I try to run the project, I get this message:

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: /home/me/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.7.2/84ffa765dd258dbab8695963c41308b054f3a1cb/jackson-databind-2.7.2.jar
File2: /home/me/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.7.3/1499b854ae9f370409792db5af1b552dc7d9682f/jackson-core-2.7.3.jar
File3: /home/me/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.7.3/e250c11c1329c7b6b62442a9743befad78be553c/jackson-annotations-2.7.3.jar

Does anyone know what is happenning?

Sergio
  • 844
  • 2
  • 9
  • 26
  • 1
    Possible duplicate of [Android Studio 0.4 Duplicate files copied in APK META-INF/LICENSE.txt](http://stackoverflow.com/questions/20827885/android-studio-0-4-duplicate-files-copied-in-apk-meta-inf-license-txt) – OneCricketeer Nov 02 '16 at 18:45
  • I am going to use this solution temporally, but I will try to find another one because this violates the Open Source licenses. Thanks anyway! – Sergio Nov 02 '16 at 19:04

1 Answers1

2

A possible solution is to add this in the build.gradle:

android {
    packagingOptions {
        exclude 'META-INF/LICENSE'
    }
} 

But it violates the Open Source licenses.

Sergio
  • 844
  • 2
  • 9
  • 26