我面臨的問題,同時建立了APK ..問題關於重複Android的支持,v4.jar
錯誤:執行失敗的任務「:應用程序:transformClassesWithJarMergingForDebug」。
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/widget/ViewDragHelper$Callback.class
我已經添加的依賴關係是:
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/PGSDK_v1.0.1.jar')
compile files('libs/gcm.jar')
compile files('libs/utilities.jar')
compile files('libs/volley.jar')
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.moengage:moe-android-sdk:7.4.01'
compile 'com.google.android.gms:play-services-gcm:10.0.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
我刪除了它,但仍然錯誤是爲「android/support/v4/widget/ViewDragHelper $ Callback.class」 – Deep
清理項目並刷新依賴項 – Aryan
您必須刪除jar文件,因爲您正在使用compile fileTree包括:['* .jar'],dir:'libs') –