Android apk Debug mode works fine but release mode gives too many warnings

[亡魂溺海] 提交于 2019-12-04 07:27:58

OK after a lot of googling and searching within stackoverflow itself, I have manages to get a solution. The following is my proguard-project.txt file:

-libraryjars /libs/android-support-v4.jar
-libraryjars /libs/apache-mime4j-core-0.7.2.jar
-libraryjars /libs/gcm.jar
-libraryjars /libs/httpclient-4.3.3.jar
-libraryjars /libs/httpcore-4.3.2.jar
-libraryjars /libs/httpmime-4.3.3.jar
-libraryjars /libs/library.jar
-libraryjars /libs/nineoldandroids-2.4.0.jar

-keepnames class org.apache.** {*;}
-keep public class org.apache.** {*;}
-dontwarn org.apache.commons.**
-dontwarn org.apache.http.annotation.ThreadSafe
-dontwarn org.apache.http.annotation.Immutable
-dontwarn org.apache.http.annotation.NotThreadSafe
-dontwarn org.apache.http.impl.auth.GGSSchemeBase
-dontwarn org.apache.http.impl.auth.KerberosScheme
-dontwarn org.apache.http.impl.auth.NegotiateScheme
-dontwarn org.apache.http.impl.auth.KerberosScheme
-dontwarn org.apache.http.impl.auth.SPNegoScheme
-dontwarn se.emilsjolander.stickylistheaders.StickyListHeadersListView
-dontwarn android.net.http.AndroidHttpClient

Hope it helps others, Thanks!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!