I am getting these weird error from proguard while exporting android app. I have edited config file. But I couldn't find what the remaining errors are.
I have added external Jars, configured -dontwarn , now I couldn't find the remaining issues.
[2013-11-22 17:13:31 - MyProject] Note: there were 1267 duplicate class definitions.
[2013-11-22 17:13:31 - MyProject] Warning: library class android.net.http.AndroidHttpClient extends or implements program class org.apache.http.client.HttpClient
[2013-11-22 17:13:31 - MyProject] You should check if you need to specify additional program jars.
[2013-11-22 17:13:31 - MyProject] Warning: there were 1 instances of library classes depending on program classes.
[2013-11-22 17:13:31 - MyProject] You must avoid such dependencies, since the program classes will
[2013-11-22 17:13:31 - MyProject] be processed, while the library classes will remain unchanged.
[2013-11-22 17:13:31 - MyProject] java.io.IOException: Please correct the above warnings first.
[2013-11-22 17:13:31 - MyProject] at proguard.Initializer.execute(Initializer.java:321)
[2013-11-22 17:13:31 - MyProject] at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-11-22 17:13:31 - MyProject] at proguard.ProGuard.execute(ProGuard.java:86)
[2013-11-22 17:13:31 - MyProject] at proguard.ProGuard.main(ProGuard.java:492)
My ProGuard Config file:
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#
-libraryjars /libs/commons-codec-1.6.jar
-libraryjars /libs/commons-logging-1.1.3.jar
-libraryjars /libs/fluent-hc-4.3.jar
-libraryjars /libs/gson-2.2.4.jar
-libraryjars /libs/httpclient-4.3.jar
-libraryjars /libs/httpclient-cache-4.3.jar
-libraryjars /libs/httpmime-4.3.jar
-libraryjars /libs/picasso-2.0.1.jar
-libraryjars /libs/picasso-2.0.1.jar
-dontwarn javax.xml.stream.events.**
-dontwarn com.squareup.okhttp.**
-dontwarn com.google.android.gms.auth.GoogleAuthUtil
-dontwarn com.squareup.picasso.OkHttpLoader
-dontwarn com.squareup.picasso.OkHttpDownloader
-dontwarn org.apache.commons.logging.impl.AvalonLogger
-dontwarn org.apache.commons.logging.impl.Log4JLogger
-dontwarn org.apache.commons.logging.impl.LogKitLogger
-dontwarn org.apache.commons.logging.impl.ServletContextCleaner
-dontwarn org.apache.http.impl.auth.GGSSchemeBase
-dontwarn org.apache.http.impl.auth.KerberosScheme
-dontwarn org.apache.http.impl.auth.SPNegoScheme
-dontwarn org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage
-dontwarn org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage
-dontwarn org.apache.http.impl.auth.NegotiateScheme
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
Try adding this in the proguard config file.
-libraryjars libs\android-support-v4.jar
-libraryjars <java.home>\lib\rt.jar
-dontwarn org.apache.commons.**
Also, why do you have -libraryjars /libs/picasso-2.0.1.jar
twice?
Have a look at this answer
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