PubNub 中的 Hello World - Android

Hello World in PubNub - Android

这是我使用 PubNub 的第一天,我正在尝试做 Hello World 示例 (https://www.pubnub.com/docs/java/pubnub-java-sdk-v4)。当我尝试 运行 项目时,我收到此消息:

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

有谁知道发生了什么事吗?

一个可能的解决方案是在 build.gradle:

中添加这个
android {
    packagingOptions {
        exclude 'META-INF/LICENSE'
    }
} 

但它违反了开源许可证。