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
答案 0 :(得分:1)
我认为问题出在您的gradle文件中。你把okhttp放在了libs文件夹中并且你编译了两次。
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.okhttp'