In my android application i have multiple third party libraries in libs folder
ex -: httpcore-4.2.4.jar , httpmime-4.2.5.jar,twitter4j-core-4.0.1.jar
these libraries are not duplicated and i'm pretty sure with that , but when i create the proguard release i get this error
(Duplicate zip entry [twitter4j-core-4.0.1.jar:META-INF/MANIFEST.MF])
.... (This error occurs for all of the library(libs)
I refereed this link to overcome with issue , i tried every option of it , but no luck with that ,
Proguard warnings "can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry)"
Is there any way to specify filters on the input jar
Your libraries are not duplicated, but some info files inside of several libraries are.
The best solution is to include in your build.gradle. inside the "android" section something like this:
android{
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LGPL2.1'
}
}
By the error message that you included here I will guess that adding this exclude will solve your problem:
exclude "META-INF/MANIFEST.MF"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With