Error instead Warning due to duplicate zip entry
Java class file shrinker, optimizer, obfuscator, and preverifier
Brought to you by:
guardsquare
I working on an Android project with Gradle. When running proguard I receive several warnings of Duplicate zip entry,
Any clue on how to solve this?
Execution failed for task ':ipos-android:proguardDebug'.
java.io.IOException: Can't write [/home/alexis/ipos-android/ipos-android/build/classes-proguard/debug/classes.jar] (Can't read [/home/alexis/.gradle/caches/modules-2/files-2.1/com.google.inject/guice/3.0/28586dc97c525501329d9a242fc3402041e3572d/guice-3.0-no_aop.jar(;;;;!META-INF/MANIFEST.MF)] (Duplicate zip entry [guice-3.0-no_aop.jar:com/google/inject/AbstractModule.class]))
Proguard is running using proguard-android.txt and some custom rules.
My custom rules are: dontobfuscate, keep and dontwarn
com/google/inject/AbstractModule.class is defined twice in your libraries. With Gradle option -i or ProGuard option -verbose, you can see which library ProGuard is reading when it encounters the duplicate. If you can suppress the dependency on one of the libraries, that should help.
See ProGuard manual > Troubleshooting > Note: duplicate definition of program/library class.
Eric