尝试在 android studio 上生成签名的 apk 时收到错误消息。研究表明我需要将一个模块排除到一个已编译的 jar 文件中。但我不知道需要排除哪一个。
The following is my list of dependancies
dependencies {
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 'com.onesignal:OneSignal:3.+@aar'
compile files('libs/antlr-runtime-3.2.jar')
compile files('libs/ical4j-1.0.2.jar')
compile files('libs/jsoup-1.8.1.jar')
compile files('libs/listviewanimations_lib-core-slh_3.1.0.jar')
compile files('libs/listviewanimations_lib-core_3.1.0.jar')
compile files('libs/listviewanimations_lib-manipulation_3.1.0.jar')
compile files('libs/natty-0.7.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/universal-image-loader-1.9.3.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile files('libs/commons-io-2.5.jar')
compile project(':hijriCalendarLibrary')
compile 'com.android.support:design:25.3.0'
testCompile 'junit:junit:4.12'
compile ('com.android.support:appcompat-v7:25.3.0'){
exclude module: 'support-v4'
}
compile 'com.google.android.gms:play-services-gcm:10.2.1'
compile 'com.google.android.gms:play-services-location:10.2.1'
compile 'com.google.android.gms:play-services-analytics:10.2.1'
compile 'com.google.android.gms:play-services-ads:10.2.1'
compile 'com.android.support:support-v4:25.3.0'
compile 'com.android.support:recyclerview-v7:25.3.0'
compile 'com.bignerdranch.android:expandablerecyclerview:1.0.3'
testCompile 'junit:junit:4.12'
}
这是收到的完整错误:
* What went wrong:
Execution failed for task ':app:transformClassesWithJarMergingForRelease'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/onesignal/ActivityLifecycleHandler$1.class
我该如何纠正这个问题?