我有一個問題,當我嘗試生成與Android 2.3工作室快速運行時錯誤而產生的apk
我得到一個錯誤的APK:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/antlr/v4/runtime/ANTLRErrorListener.class
據我所知,我的一些依賴必須實現相同的方法,但我不能找出哪一個,
這裏是我的依賴
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.graphql-java:graphql-java:2016-10-19T14-40-14'
compile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'org.altbeacon:android-beacon-library:2.12.2'
compile 'io.fotoapparat.fotoapparat:library:1.4.1'
testCompile 'junit:junit:4.12'
}
謝謝
執行'gradlew app:dependencies --configuration releaseCompileClasspath'並在此輸出。另請檢查,您是否使用'class App extends MultiDexApplication' – DeKaNszn
[Error:執行失敗的任務':app:transformClassesWithJarMergingForDebug'](https://stackoverflow.com/questions/33209631/errorexecution-failed-for-task -apptransformclasseswithjarmergingfordebug) –