Trying to get proguard to work but it always fails - android

Please don't close this as a duplicate!
I have tried upgrading to proguard 4.11
I have tried adding my the libraries I use and the libraries the libraries i use use (does that make sense :O)
I have tried adding -keep class com.google.** and keeping other classes
I have tried -dontwarn fi.foyt.*
Here are the related files:
proguard-project.txt
# 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:
-libraryjars libs/android-support-v4.jar
-libraryjars libs/crashlytics.jar
-libraryjars libs/libGoogleAnalyticsServices.jar
-libraryjars other/easyfoursquare4android/easyFoursquare4Android/bin/easyfousquareactivity.jar
-libraryjars other/foursquare-android-oauth/foursquare-oauth-library/bin/foursquare-oauth-library.jar
-libraryjars other/easyfoursquare4android/easyFoursquare4Android/libs/foursquare-api-1.0.2.jar
-libraryjars other/easyfoursquare4android/easyFoursquare4Android/libs/gson-2.2.1.jar
#-keep class com.google.** { *; }
#-keep class fi.foyt.foursquare.** { *; }
#-keep class javax.** { *; }
#-keep class org.** { *; }
#-dontwarn fi.foyt.*
#-keep class fi.foyt.**
#-keep public class android.content.Context
#-keep public interface fi.foyt.**
#-keep public class fi.foyt.**
#-dontwarn android.support.v4.**
#-keep class java.lang.reflect.**
# 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 *;
#}
project.properties
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-19
android.library.reference.1=other/foursquare-android-oauth/foursquare-oauth-library
android.library.reference.2=other/easyfoursquare4android/easyFoursquare4Android
Related console log: (click me for full log)
[2014-03-26 01:25:30 - MyAppName] Note: duplicate definition of library class [com.google.gson.JsonSerializationContext]
[2014-03-26 01:25:30 - MyAppName] Reading library jar [/Users/shereef/android-sdks/platforms/android-19/android.jar]
[2014-03-26 01:25:31 - MyAppName] Note: there were 1486 duplicate class definitions.
[2014-03-26 01:25:31 - MyAppName] Initializing...
[2014-03-26 01:25:31 - MyAppName] (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
[2014-03-26 01:25:31 - MyAppName] Note: the configuration refers to the unknown class 'com.google.vending.licensing.ILicensingService'
[2014-03-26 01:25:31 - MyAppName] Note: the configuration refers to the unknown class 'com.android.vending.licensing.ILicensingService'
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.FetchOptions$Builder
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.FetchOptions
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.URLFetchServiceFactory
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.FetchOptions$Builder
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.FetchOptions
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.URLFetchServiceFactory
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Note: android.support.v4.text.ICUCompatIcs: can't find dynamically referenced class libcore.icu.ICU
[2014-03-26 01:25:32 - MyAppName] Note: com.google.gson.internal.UnsafeAllocator: can't find dynamically referenced class sun.misc.Unsafe
[2014-03-26 01:25:32 - MyAppName] Note: there were 2 references to unknown classes.
[2014-03-26 01:25:32 - MyAppName] You should check your configuration for typos.
[2014-03-26 01:25:32 - MyAppName] (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)
[2014-03-26 01:25:32 - MyAppName] Warning: there were 35 unresolved references to classes or interfaces.
[2014-03-26 01:25:32 - MyAppName] Note: there were 2 unresolved dynamic references to classes or interfaces.
[2014-03-26 01:25:32 - MyAppName] You should check if you need to specify additional program jars.
[2014-03-26 01:25:32 - MyAppName] (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
[2014-03-26 01:25:32 - MyAppName] You may need to add missing library jars or update their versions.
[2014-03-26 01:25:32 - MyAppName] If your code works fine without the missing classes, you can suppress
[2014-03-26 01:25:32 - MyAppName] the warnings with '-dontwarn' options.
[2014-03-26 01:25:32 - MyAppName] (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
[2014-03-26 01:25:32 - MyAppName] java.io.IOException: Please correct the above warnings first.
[2014-03-26 01:25:32 - MyAppName] at proguard.Initializer.execute(Initializer.java:369)
[2014-03-26 01:25:32 - MyAppName] at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-03-26 01:25:32 - MyAppName] at proguard.ProGuard.execute(ProGuard.java:86)
[2014-03-26 01:25:32 - MyAppName] at proguard.ProGuard.main(ProGuard.java:483)
[2014-03-26 01:25:32 - MyAppName] Proguard returned with error code 1. See console
[2014-03-26 01:25:32 - MyAppName] Note: there were 1486 duplicate class definitions.
[2014-03-26 01:25:32 - MyAppName] (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.FetchOptions$Builder
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.FetchOptions
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.URLFetchServiceFactory
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.FetchOptions$Builder
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.FetchOptions
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.URLFetchServiceFactory
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.api.io.GAEIOHandler: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletRequest
[2014-03-26 01:25:32 - MyAppName] Warning: fi.foyt.foursquare.example.AuthenticationExample: can't find referenced class javax.servlet.http.HttpServletResponse
[2014-03-26 01:25:32 - MyAppName] Warning: there were 35 unresolved references to classes or interfaces.
[2014-03-26 01:25:32 - MyAppName] You may need to add missing library jars or update their versions.
[2014-03-26 01:25:32 - MyAppName] If your code works fine without the missing classes, you can suppress
[2014-03-26 01:25:32 - MyAppName] the warnings with '-dontwarn' options.
[2014-03-26 01:25:32 - MyAppName] (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
[2014-03-26 01:25:32 - MyAppName] java.io.IOException: Please correct the above warnings first.
[2014-03-26 01:25:32 - MyAppName] at proguard.Initializer.execute(Initializer.java:369)
[2014-03-26 01:25:32 - MyAppName] at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-03-26 01:25:32 - MyAppName] at proguard.ProGuard.execute(ProGuard.java:86)
[2014-03-26 01:25:32 - MyAppName] at proguard.ProGuard.main(ProGuard.java:483)
[2014-03-26 01:25:32 - EasyFousquareActivity] Using default Build Tools revision 19.0.3
Check my proguard-project.txt I have commented the lines I have tried but didn't make sense

Some classes like com.google.appengine.api.urlfetch.HTTPMethod are missing from your libraries. Apparently, your application doesn't use them anyway, so you can tell ProGuard it's okay. For instance:
-dontwarn fi.foyt.foursquare.**
-dontnote libcore.icu.ICU
-dontnote sun.misc.Unsafe
See the ProGuard manual > Troubleshooting > Warning: can't find referenced class.
Furthermore, you shouldn't specify -injars or -libraryjars options in your configuration file. The Ant/Eclipse/Gradle build process already automatically specifies all the necessary -injars, -outjars, and -libraryjars for you, based on the contents of your project.
See the ProGuard manual > Troubleshooting > Note: duplicate definition of program/library class

Related

Error with Proguard when signed application

I want to signed my application so i had enabled proguard to my application but when i signed then it show error like this in console
[2016-03-09 09:09:44 - xxx] Proguard returned with error code 1. See console
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw$zza: can't find superclass or interface org.apache.http.client.methods.HttpEntityEnclosingRequestBase
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzac: can't find referenced class android.net.http.AndroidHttpClient
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzac: can't find referenced class android.net.http.AndroidHttpClient
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.Header
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.Header
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.HttpEntity
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.HttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.StatusLine
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.impl.cookie.DateUtils
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.impl.cookie.DateUtils
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.Header
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.Header
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.HttpEntity
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.HttpEntity
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.HttpEntity
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.HttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.HttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.HttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.StatusLine
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.StatusLine
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.StatusLine
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.HttpEntity
[2016-03-09 09:09:44 - xxx Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.Header
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzt: can't find referenced class org.apache.http.Header
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.HttpClient
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpDelete
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpGet
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpHead
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpOptions
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpPost
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpPut
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpTrace
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpUriRequest
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.entity.ByteArrayEntity
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced method 'void addHeader(java.lang.String,java.lang.String)' in class com.google.android.gms.internal.zzw$zza
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpDelete
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpGet
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpHead
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpOptions
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpPost
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpPost
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpPost
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpPut
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpPut
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpTrace
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.entity.ByteArrayEntity
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.HttpClient
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpUriRequest
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpUriRequest
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.HttpClient
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.HttpClient
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpUriRequest
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpUriRequest
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.HttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.HttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpUriRequest
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpUriRequest
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw: can't find referenced class org.apache.http.client.methods.HttpUriRequest
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw$zza: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw$zza: can't find referenced method 'void setURI(java.net.URI)' in class com.google.android.gms.internal.zzw$zza
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzw$zza: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzx: can't find referenced class org.apache.http.impl.cookie.DateParseException
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzx: can't find referenced class org.apache.http.impl.cookie.DateUtils
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzx: can't find referenced class org.apache.http.impl.cookie.DateUtils
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzy: can't find referenced class org.apache.http.HttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzy: can't find referenced class org.apache.http.HttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.ProtocolVersion
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.entity.BasicHttpEntity
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.message.BasicHeader
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.message.BasicHttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.message.BasicStatusLine
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.ProtocolVersion
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.entity.BasicHttpEntity
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.entity.BasicHttpEntity
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.entity.BasicHttpEntity
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.entity.BasicHttpEntity
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.entity.BasicHttpEntity
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.message.BasicHeader
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.message.BasicHttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.message.BasicHttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.message.BasicHttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.message.BasicStatusLine
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.HttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.HttpResponse
[2016-03-09 09:09:44 - xxx] Warning: com.google.android.gms.internal.zzz: can't find referenced class org.apache.http.HttpEntity
[2016-03-09 09:09:44 - xxx] You should check if you need to specify additional program jars.
[2016-03-09 09:09:44 - xxx] Warning: there were 87 unresolved references to classes or interfaces.
[2016-03-09 09:09:44 - xxx] You may need to specify additional library jars (using '-libraryjars').
[2016-03-09 09:09:44 - xxx] Warning: there were 2 unresolved references to program class members.
[2016-03-09 09:09:44 - xxx] Your input classes appear to be inconsistent.
[2016-03-09 09:09:44 - xxx] You may need to recompile them and try again.
[2016-03-09 09:09:44 - xxx] Alternatively, you may have to specify the option
[2016-03-09 09:09:44 - xxx] '-dontskipnonpubliclibraryclassmembers'.
[2016-03-09 09:09:44 - xxx] java.io.IOException: Please correct the above warnings first.
[2016-03-09 09:09:44 - xxx] at proguard.Initializer.execute(Initializer.java:321)
[2016-03-09 09:09:44 - xxx] at proguard.ProGuard.initialize(ProGuard.java:211)
[2016-03-09 09:09:44 - xxx] at proguard.ProGuard.execute(ProGuard.java:86)
[2016-03-09 09:09:44 - xxx] at proguard.ProGuard.main(ProGuard.java:492)
Is there a way to fix it? as i know the proguard error in there with google play service too
and in there at this line
[2016-03-09 09:09:44 - xxx] You should check if you need to specify additional program jars.
[2016-03-09 09:09:44 - xxx] Warning: there were 87 unresolved references to classes or interfaces.
[2016-03-09 09:09:44 - xxx] You may need to specify additional library jars (using '-libraryjars').
[2016-03-09 09:09:44 - xxx] Warning: there were 2 unresolved references to program class members.
[2016-03-09 09:09:44 - xxx] Your input classes appear to be inconsistent.
[2016-03-09 09:09:44 - xxx] You may need to recompile them and try again.
[2016-03-09 09:09:44 - xxx] Alternatively, you may have to specify the option
[2016-03-09 09:09:44 - xxx] '-dontskipnonpubliclibraryclassmembers'.
[2016-03-09 09:09:44 - xxx] java.io.IOException: Please correct the above warnings first.
[2016-03-09 09:09:44 - xxx] at proguard.Initializer.execute(Initializer.java:321)
[2016-03-09 09:09:44 - xxx] at proguard.ProGuard.initialize(ProGuard.java:211)
[2016-03-09 09:09:44 - xxx] at proguard.ProGuard.execute(ProGuard.java:86)
[2016-03-09 09:09:44 - xxx] at proguard.ProGuard.main(ProGuard.java:492)
there is something unresolved
file in proguard project
# 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 *;
#}
#-keep class * extends java.util.ListResourceBundle {
# protected Object[][] getContents();
#}
#-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
# public static final *** NULL;
#}
#-keepnames #com.google.android.gms.common.annotation.KeepName class *
#-keepclassmembernames class * {
# #com.google.android.gms.common.annotation.KeepName *;
#}
#-keepnames class * implements android.os.Parcelable {
# public static final ** CREATOR;
#}
-keep class com.google.android.gms.ads.**
I use "#" to rules in there because i dont know the function so ijust use -keep class com.google.android.gms.ads.**
can anyone explain this why?
please replace your proguard file with this proguard file.
Proguardrule.pro
# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
# Optimization is turned off by default. Dex does not like code run
# through the ProGuard optimize and preverify steps (and performs some
# of these optimizations on its own).
#-dontoptimize
#-dontpreverify
# If you want to enable optimization, you should include the
# following:
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
-optimizationpasses 5
-allowaccessmodification
#
# Note that you cannot just include these flags in your own
# configuration file; if you are including this file, optimization
# will be turned off. You'll need to either edit this file, or
# duplicate the contents of this file and remove the include of this
# file from your project's proguard.config path property.
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgent
-keep public class * extends android.preference.Preference
-keep public class * extends android.support.v4.app.Fragment
-keep public class * extends android.support.v4.app.DialogFragment
-keep public class * extends com.actionbarsherlock.app.SherlockListFragment
-keep public class * extends com.actionbarsherlock.app.SherlockFragment
-keep public class * extends com.actionbarsherlock.app.SherlockFragmentActivity
-keep public class * extends android.app.Fragment
-keep public class com.android.vending.licensing.ILicensingService
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keepclasseswithmembernames class * {
native <methods>;
}
-keep public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
public void set*(...);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class com.actionbarsherlock.** { *; }
-keep interface com.actionbarsherlock.** { *; }
# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version. We know about them, and they are safe.
-dontwarn android.support.**
-dontwarn com.google.ads.**

how to obfuscation android application with ProGuard

I watched this link and My application use google play services. I added this lines
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
-keepnames #com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
#com.google.android.gms.common.annotation.KeepName *;
}
-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}
but when i export my application gives this error:
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Proguard returned with error code 1. See console
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.fitness.service.FitnessSensorService$a: can't find referenced class android.app.AppOpsManager
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.fitness.service.FitnessSensorService$a: can't find referenced class android.app.AppOpsManager
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.internal.af: can't find referenced method 'boolean isAttachedToWindow()' in class android.view.View
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.internal.an$2: can't find referenced method 'void evaluateJavascript(java.lang.String,android.webkit.ValueCallback)' in class android.webkit.WebView
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: com.google.android.gms.internal.gu: can't find referenced method 'void evaluateJavascript(java.lang.String,android.webkit.ValueCallback)' in class android.webkit.WebView
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] You should check if you need to specify additional program jars.
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: there were 11 unresolved references to classes or interfaces.
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] You may need to specify additional library jars (using '-libraryjars').
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Warning: there were 3 unresolved references to program class members.
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Your input classes appear to be inconsistent.
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] You may need to recompile them and try again.
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] Alternatively, you may have to specify the option
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] '-dontskipnonpubliclibraryclassmembers'.
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] java.io.IOException: Please correct the above warnings first.
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] at proguard.Initializer.execute(Initializer.java:321)
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] at proguard.ProGuard.initialize(ProGuard.java:211)
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] at proguard.ProGuard.execute(ProGuard.java:86)
[2015-02-20 23:15:04 - TurkiyeYollarindaTrafikOlaylari] at proguard.ProGuard.main(ProGuard.java:492)
I'm new on using proguard. I will publish my first android application. I dont understand these errors so any help?
Might it be that you are using 3rd party libraries in your project that you forgot to include in the proguard.config using the '-libraryjars' tag...?

Add jar file path added in library project in PROGUARD

I have started including proguard in my project. But getting few warning. I am able to eliminate the warning by adding -dontwarn com.google.**. in proguard.cfg file. Every thing is okk, but I want to eliminate the -dontwarn command entirely from my project. After some investigation I found out these warning is there because I have added a jar in my library project. Now I have few questions here.
1) Do I need to add anything in my project properties for progurad to work on my library project. And also doesn't add any warning
(As per my research I dont need to I guess. Refer to this url)
2) Since my guava.jar is added in my library project, Do I need to some command in my application proguard.cfg file to add library path like -libraryjars. If yes, how do I add the -libraryjars . I am talking about path at this instance. What path should I include or whats the syntax of adding path of the jar which is there in my library project?
Just for refrence I am adding error log.
[2014-12-11 18:00:26 - MyProject] Proguard returned with error code 1. See console
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalences$Impl$1: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalences$Impl$1: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalences$Impl$1: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalences$Impl$2: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalences$Impl$2: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Equivalences$Impl$2: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Function: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Function: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$ConstantFunction: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$ConstantFunction: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$ConstantFunction: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$ForMapWithDefault: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$ForMapWithDefault: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$FunctionComposition: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$FunctionForMapNoDefault: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Functions$PredicateFunction: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Joiner: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Joiner: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Joiner: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Joiner: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Joiner: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Joiner: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects$ToStringHelper: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Objects$ToStringHelper: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.PairwiseEquivalence: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.PairwiseEquivalence: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.PairwiseEquivalence: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.PairwiseEquivalence: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Platform: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Preconditions: can't find referenced class javax.annotation.Nullable
[2014-12-11 18:00:26 - MyProject] Warning: com.google.common.base.Preconditions: can't find referenced class javax.annotation.Nullable
more few hundred lines of error.
Can anybody help me in this? Any help will be appreciated.
The warnings are harmless in this case: the missing class is not necessary for the correct processing or execution of your code. You can either add the jar that contains javax.annotation.Nullable as a dependency in your project, or you can suppress the warnings. This works indeed:
-dontwarn com.google.**
Alternatively, this is slightly more succinct:
-dontwarn javax.annotation.Nullable

Unable to configure Proguard for extracting APK

I keep getting the error message (far below) when running ProGuard on my app. I do have external library files in my app.
This is my proguard-android.txt file code
# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
# Optimization is turned off by default. Dex does not like code run
# through the ProGuard optimize and preverify steps (and performs some
# of these optimizations on its own).
-dontoptimize
-dontpreverify
# Note that if you want to enable optimization, you cannot just
# include optimization flags in your own project configuration file;
# instead you will need to point to the
# "proguard-android-optimize.txt" file instead of this one from your
# project.properties file.
-keepattributes *Annotation*
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keepclasseswithmembernames class * {
native <methods>;
}
# keep setters in Views so that animations can still work.
# see http://proguard.sourceforge.net/manual/examples.html#beans
-keepclassmembers public class * extends android.view.View {
void set*(***);
*** get*();
}
# We want to keep methods in Activity that could be used in the XML attribute onClick
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
-keep class javax.** { *; }
-keep class org.** { *; }
-keep class com.squareup.** { *; }
# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version. We know about them, and they are safe.
-dontwarn android.support.**
-dontwarn javax.management.**
-dontwarn java.lang.management.**
-dontwarn org.apache.log4j.**
-dontwarn org.apache.commons.logging.**
-dontwarn org.slf4j.**
-dontwarn org.json.*
-dontwarn com.squareup.okhttp.OkHttpClient.*
Logcat error message:
[2014-08-26 18:25:15 - Scootr] Proguard returned with error code 1. See console
[2014-08-26 18:25:15 - Scootr] Note: there were 1 duplicate class definitions.
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find superclass or interface javax.servlet.ServletContextListener
[2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
[2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
[2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory
[2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
[2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
[2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
[2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory
[2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory
[2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory
[2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkUrlFactory
[2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
[2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
[2014-08-26 18:25:15 - Scootr] Warning: com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.AvalonLogger: can't find referenced class org.apache.avalon.framework.logger.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Category
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Level
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.Log4JLogger: can't find referenced class org.apache.log4j.Priority
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Hierarchy
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.LogKitLogger: can't find referenced class org.apache.log.Logger
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextListener
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent
[2014-08-26 18:25:15 - Scootr] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find referenced class javax.servlet.ServletContextEvent
[2014-08-26 18:25:15 - Scootr] You should check if you need to specify additional program jars.
[2014-08-26 18:25:15 - Scootr] Warning: there were 87 unresolved references to classes or interfaces.
[2014-08-26 18:25:15 - Scootr] You may need to specify additional library jars (using '-libraryjars').
[2014-08-26 18:25:15 - Scootr] java.io.IOException: Please correct the above warnings first.
[2014-08-26 18:25:15 - Scootr] at proguard.Initializer.execute(Initializer.java:321)
[2014-08-26 18:25:15 - Scootr] at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-08-26 18:25:15 - Scootr] at proguard.ProGuard.execute(ProGuard.java:86)
[2014-08-26 18:25:15 - Scootr] at proguard.ProGuard.main(ProGuard.java:492)
add this to your proguard.cfg:
#### -- Picasso --
-dontwarn com.squareup.picasso.**
#### -- OkHttp --
-dontwarn com.squareup.okhttp.internal.**
#### -- Apache Commons --
-dontwarn org.apache.commons.logging.**
You line -dontwarn com.squareup.okhttp.OkHttpClient.* not correlated with Warning: com.squareup.picasso.OkHttpDownloader.
May be you try change package name in proguard.cfg
Added:
Try add in proguard.cfg
-dontwarn
-injars bin/classes
-injars libs
-outjars bin/classes-processed.jar
-optimizationpasses 5
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dump class_files.txt
-printseeds seeds.txt
-printusage unused.txt
-printmapping mapping.txt
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-allowaccessmodification
-repackageclasses ''
-keepattributes Signature
I understand between proguard.cfg or proguard-project.txt (proguard-android.txt) file. Try this code in both files.
Check if you have deleted the library from /libs , I deleted the jar file I put and it generated my apk instantly! :) Good luck!

Error in Jackson.jar when running proguard in android

I have an android project that uses jackson-all-1.7.2.jar.
When I run a proguard with this proguard.cfg file:
-keep class com.actionbarsherlock.** {*;}
-keep class org.holoeverywhere.** {*;}
-libraryjars /libs/jackson-all-1.7.2.jar
I got this exception:
[2013-06-15 06:06:04 - ArrowAndroid] Proguard returned with error code 1. See console
[2013-06-15 06:06:04 - ArrowAndroid] Note: there were 600 duplicate class definitions.
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJsonProvider: can't find superclass or interface javax.ws.rs.ext.MessageBodyReader
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJsonProvider: can't find superclass or interface javax.ws.rs.ext.MessageBodyWriter
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JsonMappingExceptionMapper: can't find superclass or interface javax.ws.rs.ext.ExceptionMapper
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JsonParseExceptionMapper: can't find superclass or interface javax.ws.rs.ext.ExceptionMapper
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.xc.DataHandlerJsonDeserializer$1: can't find superclass or interface javax.activation.DataSource
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider: can't find referenced class javax.ws.rs.ext.Provider
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider: can't find referenced class javax.ws.rs.Consumes
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider: can't find referenced class javax.ws.rs.Produces
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJsonProvider: can't find referenced class javax.ws.rs.core.MediaType
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJsonProvider: can't find referenced class javax.ws.rs.ext.Providers
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJsonProvider: can't find referenced class javax.ws.rs.ext.ContextResolver
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJsonProvider: can't find referenced class javax.ws.rs.core.StreamingOutput
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJsonProvider: can't find referenced class javax.ws.rs.core.Response
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJsonProvider: can't find referenced class javax.ws.rs.ext.MessageBodyReader
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJsonProvider: can't find referenced class javax.ws.rs.ext.MessageBodyWriter
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJsonProvider: can't find referenced class javax.ws.rs.core.MediaType
[2013-06-15 06:06:04 - ArrowAndroid] Warning: org.codehaus.jackson.jaxrs.JacksonJsonProvider: can't find referenced class javax.ws.rs.ext.Providers
.....
.....
.....
[2013-06-15 06:06:04 - ArrowAndroid] You should check if you need to specify additional program jars.
[2013-06-15 06:06:04 - ArrowAndroid] Warning: there were 387 unresolved references to classes or interfaces.
[2013-06-15 06:06:04 - ArrowAndroid] You may need to specify additional library jars (using '-libraryjars').
[2013-06-15 06:06:04 - ArrowAndroid] java.io.IOException: Please correct the above warnings first.
[2013-06-15 06:06:04 - ArrowAndroid] at proguard.Initializer.execute(Initializer.java:321)
[2013-06-15 06:06:04 - ArrowAndroid] at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-06-15 06:06:04 - ArrowAndroid] at proguard.ProGuard.execute(ProGuard.java:86)
[2013-06-15 06:06:04 - ArrowAndroid] at proguard.ProGuard.main(ProGuard.java:492)
Note, the app running perfectly without proguard.
When I add the following line in proguard.cfg
-dontwarn org.codehaus.jackson
The app crashes reporting this exception:
Caused by: java.lang.ExceptionInInitializerError
at org.codehaus.jackson.map.ObjectMapper.<clinit>(Unknown Source)
... 15 more
Caused by: java.lang.NoSuchFieldError: PUBLIC_ONLY
at java.lang.Class.getDeclaredAnnotation(Native Method)
at java.lang.Class.getAnnotation(Class.java:260)
at org.codehaus.jackson.map.introspect.VisibilityChecker$Std.<clinit>(Unknown Source)
... 16 more
The file jackson-all-1.7.2.jar is already in your libs directory, so the Android Ant/Eclipse builds will pick it up automatically. You shouldn't read it again with -libraryjars, because then you'll get these warnings about duplicates.
Jackson is using reflection to find some annotations. ProGuard can't deduce this automatically, and it ends up removing related, seemingly unused fields. This configuration should keep them:
-keepclassmembers public final enum org.codehaus.jackson.annotate.JsonAutoDetect$Visibility {
public static final org.codehaus.jackson.annotate.JsonAutoDetect$Visibility *;
}
Add these line in your proguard configuration file.
-keepnames class com.fasterxml.jackson.** {
*;
}
-keepnames interface com.fasterxml.jackson.** {
*;
}

Categories

Resources