android - Proguard warnings "can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry)" -
i'm using intellij , running proguard in debug mode can't seem rid of warnings such as:
proguard: [myapplication] warning: can't write resource [meta-inf/manifest.mf] (duplicate zip entry [android-support-v13.jar:meta-inf/manifest.mf]) this project has couple of modules , android-support-v13.jar being used on 2 of them. thought issue removed library libs folder, added project library , added dependency both modules. didn't solve anything, warning persists , don't understand why.
i know these warnings don't affect clean build happy build!
possibly 'proguard.cfg' problem. include '-injars'? if project includes project library, jars can processed twice. post 'proguard.cfg'?
extract http://proguard.sourceforge.net/index.html#manual/troubleshooting.html:
your input jars contain multiple resource files same name. proguard continues copying resource files usual, skipping files used names. once more, warning may indication of problem though, it's advisable remove duplicates. convenient way specifying filters on input jars. there no option switch off these warnings.
option #1:
as can't post '-injars', check if include either 'android-support-v13.jar' or library included in project includes 'android-support-v13.jar'.
assuming building ant inside intellij idea, mustn't add -injars, -outjars, or -libraryjars options; ant script you.
option #2:
although warnings harmless, clean build happy build, try:
and
https://gist.github.com/paulpv/4439012
option #3:
include (!meta-inf/manifest.mf) after each '-injars' command
-injars library.jar(!meta-inf/manifest.mf) option #4: android proguard duplicate definition
fixed moving 3rd party libraries directory, in case 'lib'. added
-injars lib/jmdns.jarto proguard.cfg file.
option #5: android - proguard duplicate zip entry error
if proguard config file includes following line, remove it:
-injars bin/classes option #6: android obfuscate app using proguard keeps obfuscating library jars - or it?
i found way make proguard leave library jars alone ask preserve package names, eg:
-keep class javax.** { *; } -keep class org.** { *; } -keep class twitter4j.** { *; }
option #7:
a weird solution (deleting meta-inf folder in src folder) similar here.
Comments
Post a Comment