【问题标题】:I get this error when i try to run my android app [duplicate]当我尝试运行我的 android 应用程序时出现此错误 [重复]
【发布时间】:2016-05-25 08:19:40
【问题描述】:
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/maven/com.squareup.okhttp/okhttp/pom.xml File1: /home/sks/MyApplication/app/libs/okhttp-2.7.2.jar File2: /home/sks/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp/okhttp/2.7.2/20f6463eb19ac61960c5d91a094c2f4f0727dc2e/okhttp-2.7.2.jar

【问题讨论】:

    标签: android android-studio google-cloud-messaging


    【解决方案1】:

    我认为问题出在您的 gradle 文件中。您将 okhttp 放在 libs 文件夹中并编译了两次。

    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.okhttp'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-04-16
      • 2016-04-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-25
      • 1970-01-01
      相关资源
      最近更新 更多