Error in Jackson.jar when running proguard in android - 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.** {
*;
}

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.**

Proguard - Proguard returned with error code 1

Recently integrated Pushwoosh library to my android app. It worked fine. But facing following error while export as signed application. Please help. Thanks in advance.
Proguard returned with error code 1. See console
Warning: com.arellomobile.android.push.MessageAlertReceiver: can't find superclass or interface com.amazon.device.messaging.ADMMessageReceiver
Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find superclass or interface com.amazon.device.messaging.ADMMessageHandlerBase
Warning: com.arellomobile.android.push.PushAmazonIntentService$MessageAlertReceiver: can't find superclass or interface com.amazon.device.messaging.ADMMessageReceiver
Warning: com.arellomobile.android.push.ADMRegistrar: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.ADMRegistrar: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.ADMRegistrar: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
Warning: com.arellomobile.android.push.MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find referenced class com.amazon.device.messaging.ADMMessageHandlerBase
Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find referenced method 'android.content.Context getApplicationContext()' in class com.arellomobile.android.push.PushAmazonIntentService
Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find referenced class com.amazon.device.messaging.ADMMessageHandlerBase
Warning: com.arellomobile.android.push.PushAmazonIntentService$MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
Warning: com.arellomobile.android.push.PushAmazonIntentService$MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
You should check if you need to specify additional program jars.
Warning: there were 17 unresolved references to classes or interfaces.
You may need to specify additional library jars (using '-libraryjars').
Warning: there were 1 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile them and try again.
Alternatively, you may have to specify the option
'-dontskipnonpubliclibraryclassmembers'.
java.io.IOException: Please correct the above warnings first.
at proguard.Initializer.execute(Initializer.java:321)
at proguard.ProGuard.initialize(ProGuard.java:211)
at proguard.ProGuard.execute(ProGuard.java:86)
at proguard.ProGuard.main(ProGuard.java:492)
Proguard returned with error code 1. See console
proguard.ParseException: Expecting opening '{' at 'public' in line 22 of file 'D:\Android-pjt-build\Dec14\test\proguard-project.txt',
included from argument number 4
at proguard.ConfigurationParser.parseClassSpecificationArguments(ConfigurationParser.java:678)
at proguard.ConfigurationParser.parseKeepClassSpecificationArguments(ConfigurationParser.java:490)
at proguard.ConfigurationParser.parse(ConfigurationParser.java:139)
at proguard.ProGuard.main(ProGuard.java:484)
testProguard returned with error code 1. See console
testproguard.ParseException: Unknown option '-dontskipnonpubliclibraryclassmembers.**' in line 24 of file 'D:\Android-pjt-build\Dec14\test\proguard-project.txt',
test included from argument number 4
test at proguard.ConfigurationParser.parse(ConfigurationParser.java:191)
test at proguard.ProGuard.main(ProGuard.java:484)
Proguard returned with error code 1. See console
Warning: com.arellomobile.android.push.MessageAlertReceiver: can't find superclass or interface com.amazon.device.messaging.ADMMessageReceiver
Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find superclass or interface com.amazon.device.messaging.ADMMessageHandlerBase
Warning: com.arellomobile.android.push.PushAmazonIntentService$MessageAlertReceiver: can't find superclass or interface com.amazon.device.messaging.ADMMessageReceiver
Warning: com.arellomobile.android.push.ADMRegistrar: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.ADMRegistrar: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.ADMRegistrar: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
Warning: com.arellomobile.android.push.MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find referenced class com.amazon.device.messaging.ADMMessageHandlerBase
Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find referenced method 'android.content.Context getApplicationContext()' in class com.arellomobile.android.push.PushAmazonIntentService
Warning: com.arellomobile.android.push.PushAmazonIntentService: can't find referenced class com.amazon.device.messaging.ADMMessageHandlerBase
Warning: com.arellomobile.android.push.PushAmazonIntentService$MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
Warning: com.arellomobile.android.push.PushAmazonIntentService$MessageAlertReceiver: can't find referenced class com.amazon.device.messaging.ADMMessageReceiver
Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
Warning: com.arellomobile.android.push.registrar.PushRegistrarADM: can't find referenced class com.amazon.device.messaging.ADM
You should check if you need to specify additional program jars.
Warning: there were 17 unresolved references to classes or interfaces.
You may need to specify additional library jars (using '-libraryjars').
Warning: there were 1 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile them and try again.
Alternatively, you may have to specify the option
'-dontskipnonpubliclibraryclassmembers'.
java.io.IOException: Please correct the above warnings first.
at proguard.Initializer.execute(Initializer.java:321)
at proguard.ProGuard.initialize(ProGuard.java:211)
at proguard.ProGuard.execute(ProGuard.java:86)
at proguard.ProGuard.main(ProGuard.java:492)
Do not obfuscate Pushwoosh classes, as well as com.arellomobile.android.*
put this line in last line of proguard file
-dontwarn com.amazon.**
solved by adding this line in project.txt
-dontwarn com.arellomobile.android.push.**

Android Proguard SqlCipher NoClassDefFoundError

Have been battling with Proguard all day and have tried many examples and solutions on the official Proguard site as well as StackOverflow.
I have a large project I need to obfuscate, which has a number of referenced library projects and Jars.
I am getting 725 warnings from proguard from 2 libs, com.google.common and twitter4j.
I can happily get the project to compile if I add the following:
-dontwarn com.google.common.**
-dontwarn twitter4j.**
However, the app crashes instantly on open, so this seems to just be a way of hiding an issue, not fixing it.
The proguard-project.txt is in the project root and its config is in the project.properties file as below.
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
Here is my proguard-project.txt file
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-dontshrink
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-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.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keep class javax.** { *; }
-keep class org.** { *; }
-keep class twitter4j.** { *; }
-keep class com.google.code.** { *; }
-keep class java.lang.management.** { *; }
-keep class com.google.common.** { *; }
-libraryjars C:/adt-bundle-windows/sdk/platforms/android-19/android.jar
-libraryjars C:/adt-bundle-windows/sdk/extras/android/support/v4/android-support-v4.jar
-libraryjars C:/svn/android/MyAppLib/trunk/libs/commons-codec.jar
-libraryjars C:/svn/android/MyAppLib/trunk/libs/sqlcipher.jar
-libraryjars C:/svn/android/MyAppLib/trunk/libs/twitter4j-core-3.0.3.jar
-libraryjars C:/svn/android/MyAppLib/trunk/libs/guava-r09.jar
-libraryjars C:/adt-bundle-windows/sdk/platforms/android-19/android.jar
-libraryjars C:/adt-bundle-windows/sdk/extras/android/support/v4/android-support-v4.jar
-libraryjars C:/adt-bundle-windows/sdk/add-ons/addon-google_apis-google-19/libs/maps.jar
-libraryjars C:/adt-bundle-windows/sdk/add-ons/addon-google_apis-google-19/libs/effects.jar
-libraryjars C:/adt-bundle-windows/sdk/add-ons/addon-google_apis-google-19/libs/usb.jar
-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.content.Context {
public void *(android.view.View);
public void *(android.view.MenuItem);
}
-keepclassmembers class * implements android.os.Parcelable {
static ** CREATOR;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
-keepclassmembers class * {
#android.webkit.JavascriptInterface <methods>;
}
-dontwarn android.support.**
And Here is the truncated error log
[2014-01-13 14:00:07 - MyApp] Proguard returned with error code 1. See console
[2014-01-13 14:00:07 - MyApp] Note: there were 9032 duplicate class definitions.
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.management.APIStatisticsOpenMBean: can't find superclass or interface javax.management.DynamicMBean
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Equivalence: can't find referenced class javax.annotation.Nullable
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Equivalences$Impl$1: can't find referenced class javax.annotation.Nullable
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Equivalences$Impl$1: can't find referenced class javax.annotation.Nullable
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Equivalences$Impl$1: can't find referenced class javax.annotation.Nullable
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Equivalences$Impl$2: can't find referenced class javax.annotation.Nullable
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Equivalences$Impl$2: can't find referenced class javax.annotation.Nullable
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Equivalences$Impl$2: can't find referenced class javax.annotation.Nullable
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Function: can't find referenced class javax.annotation.Nullable
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Function: can't find referenced class javax.annotation.Nullable
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Functions: can't find referenced class javax.annotation.Nullable
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Functions: can't find referenced class javax.annotation.Nullable
[2014-01-13 14:00:07 - MyApp] Warning: com.google.common.base.Functions$ConstantFunction: can't find referenced class javax.annotation.Nullable
*********************************** ANOTHER 500 LINES OF com.google.common ERRORS ******************************************
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class java.lang.management.ManagementFactory
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.ObjectName
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.ObjectName
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanServer
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.InstanceAlreadyExistsException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.InstanceAlreadyExistsException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.InstanceAlreadyExistsException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanRegistrationException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanRegistrationException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanRegistrationException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.NotCompliantMBeanException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.NotCompliantMBeanException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.NotCompliantMBeanException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MalformedObjectNameException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MalformedObjectNameException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MalformedObjectNameException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class java.lang.management.ManagementFactory
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanServer
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.ObjectName
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.ObjectName
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanServer
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.InstanceAlreadyExistsException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MBeanRegistrationException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.NotCompliantMBeanException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.TwitterAPIMonitor: can't find referenced class javax.management.MalformedObjectNameException
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.CommonsLoggingLoggerFactory: can't find referenced class org.apache.commons.logging.LogFactory
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.CommonsLoggingLoggerFactory: can't find referenced class org.apache.commons.logging.LogFactory
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Level
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Level
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLoggerFactory: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.Log4JLoggerFactory: can't find referenced class org.apache.log4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLoggerFactory: can't find referenced class org.slf4j.LoggerFactory
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.internal.logging.SLF4JLoggerFactory: can't find referenced class org.slf4j.LoggerFactory
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.CompositeType
[2014-01-13 14:00:07 - MyApp] Warning: twitter4j.management.APIStatisticsOpenMBean: can't find referenced class javax.management.openmbean.CompositeType
*********************************** ANOTHER 500 LINES OF twitter4j ERRORS ******************************************
[2014-01-13 14:00:07 - MyApp] You should check if you need to specify additional program jars.
[2014-01-13 14:00:07 - MyApp] Warning: there were 725 unresolved references to classes or interfaces.
[2014-01-13 14:00:07 - MyApp] You may need to specify additional library jars (using '-libraryjars').
[2014-01-13 14:00:07 - MyApp] java.io.IOException: Please correct the above warnings first.
[2014-01-13 14:00:07 - MyApp] at proguard.Initializer.execute(Initializer.java:321)
[2014-01-13 14:00:07 - MyApp] at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-01-13 14:00:07 - MyApp] at proguard.ProGuard.execute(ProGuard.java:86)
[2014-01-13 14:00:07 - MyApp] at proguard.ProGuard.main(ProGuard.java:492)
EDIT** Stack trace from crash, clearer now that it is linked to sqlcipher
E/Database(18203): Can't find SQLiteDatabase.mNativeHandle
E/Cursor(18203): Can't find net/sqlcipher/database/SQLiteCompiledSql
E/Cursor(18203): Can't find net/sqlcipher/database/SQLiteQuery
E/Cursor(18203): Can't find net/sqlcipher/database/SQLiteProgram
E/Cursor(18203): Can't find net/sqlcipher/database/SQLiteStatement
E/CursorWindow(18203): Can't find net/sqlcipher/CursorWindow
D/AndroidRuntime(18203): Shutting down VM
W/dalvikvm(18203): threadid=1: thread exiting with uncaught exception (group=0x415e9ba8)
E/AndroidRuntime(18203): FATAL EXCEPTION: main
E/AndroidRuntime(18203): Process: com.mycompany.android.myapp, PID: 18203
E/AndroidRuntime(18203): java.lang.NoClassDefFoundError: net/sqlcipher/CursorWindow
E/AndroidRuntime(18203): at java.lang.Runtime.nativeLoad(Native Method)
E/AndroidRuntime(18203): at java.lang.Runtime.doLoad(Runtime.java:421)
E/AndroidRuntime(18203): at java.lang.Runtime.loadLibrary(Runtime.java:362)
E/AndroidRuntime(18203): at java.lang.System.loadLibrary(System.java:526)
E/AndroidRuntime(18203): at net.sqlcipher.database.SQLiteDatabase.a(Unknown Source)
E/AndroidRuntime(18203): at net.sqlcipher.database.SQLiteDatabase.a(Unknown Source)
E/AndroidRuntime(18203): at com.mycompany.android.myapplib.sqlite.MyProvider.onCreate(Unknown Source)
E/AndroidRuntime(18203): at android.content.ContentProvider.attachInfo(ContentProvider.java:1591)
E/AndroidRuntime(18203): at android.content.ContentProvider.attachInfo(ContentProvider.java:1562)
E/AndroidRuntime(18203): at android.app.ActivityThread.installProvider(ActivityThread.java:4790)
E/AndroidRuntime(18203): at android.app.ActivityThread.installContentProviders(ActivityThread.java:4385)
E/AndroidRuntime(18203): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4325)
E/AndroidRuntime(18203): at android.app.ActivityThread.access$1500(ActivityThread.java:135)
E/AndroidRuntime(18203): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
E/AndroidRuntime(18203): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(18203): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(18203): at android.app.ActivityThread.main(ActivityThread.java:5017)
E/AndroidRuntime(18203): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(18203): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(18203): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
E/AndroidRuntime(18203): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
E/AndroidRuntime(18203): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(18203): Caused by: java.lang.NoClassDefFoundError: net/sqlcipher/database/SQLiteStatement
E/AndroidRuntime(18203): ... 22 more
E/AndroidRuntime(18203): Caused by: java.lang.NoClassDefFoundError: net/sqlcipher/database/SQLiteProgram
E/AndroidRuntime(18203): ... 22 more
E/AndroidRuntime(18203): Caused by: java.lang.NoClassDefFoundError: net/sqlcipher/database/SQLiteQuery
E/AndroidRuntime(18203): ... 22 more
E/AndroidRuntime(18203): Caused by: java.lang.NoClassDefFoundError: net/sqlcipher/database/SQLiteCompiledSql
E/AndroidRuntime(18203): ... 22 more
E/AndroidRuntime(18203): Caused by: java.lang.NoSuchFieldError: no field with name='mNativeHandle' signature='I' in class Lnet/sqlcipher/database/SQLiteDatabase;
E/AndroidRuntime(18203): ... 22 more
These are the config I've used in the past for SQLcipher
-keep public class net.sqlcipher.** {
*;
}
-keep public class net.sqlcipher.database.** {
*;
}
I'll suggest you to add thoses 2 lines in your proguard file :
-dontwarn javax.management.**
-dontwarn org.apache.commons.logging.**
-keep class net.sqlcipher.** { *; }
-dontwarn net.sqlcipher.**
For more information

Android application signing: Proguard returned with error code 1. see console

I have built an application that uses JacksonJson as a library. I am trying to export it as a signed application and getting the proguard error. I have tried various solutions posted on the internet, but none seems to work. Any help will be appreciated.
Console:
Proguard returned with error code 1. See console
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find superclass or interface javax.ws.rs.ext.ExceptionMapper
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find superclass or interface javax.ws.rs.ext.ExceptionMapper
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find superclass or interface javax.ws.rs.ext.MessageBodyReader
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find superclass or interface javax.ws.rs.ext.MessageBodyWriter
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response$Status
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.ext.ExceptionMapper
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response$Status
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.ext.ExceptionMapper
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.ext.Provider
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response$Status
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.ext.ExceptionMapper
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response$Status
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.ext.ExceptionMapper
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.ext.Provider
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.StreamingOutput
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.ext.MessageBodyReader
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.ext.MessageBodyWriter
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.ext.MessageBodyReader
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.ext.MessageBodyWriter
You should check if you need to specify additional program jars.
Warning: there were 67 unresolved references to classes or interfaces.
You may need to specify additional library jars (using '-libraryjars').
java.io.IOException: Please correct the above warnings first.
at proguard.Initializer.execute(Initializer.java:321)
at proguard.ProGuard.initialize(ProGuard.java:211)
at proguard.ProGuard.execute(ProGuard.java:86)
at proguard.ProGuard.main(ProGuard.java:492)
Here is my project.properties file:
# 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-18
android.library.reference.3=../ABCSourceCode/Libraries/ABCLibrary
android.library.reference.4=../ABCSourceCode/Libraries/AndroidHorizontalListView
android.library.reference.1=../ABCSourceCode/Libraries/ABS_Library
android.library.reference.2=../ABCSourceCode/Libraries/google-play-services_lib
android.library.reference.6=../ABCSourceCode/Libraries/volleyLibrary
android.library.reference.5=../ABCSourceCode/Libraries/SlidingMenuForklibrary
IN proguard config file, just skip all the above libs which are thrown in error by below mentioned way..
-keep class yourclassname.** { *; }
In your case it would be
-keep class javax.ws.rs.** { *; }
-dontwarn com.fasterxml.jackson.**
Try doing this and run build again.

android proguard causes apk to crash

My app works fine in debug and also when I export to a signed apk if I have proguard disabled by commenting out "proguard.config=${sdk.dir}/tools/proguard..." in project.properties.
However, if I uncomment that line I get a bunch of warnings and proguard won't create the apk. I can suppress the warnings by adding the following lines to proguard-project.txt
-dontwarn com.sun.mail.imap.protocol.**
-dontwarn org.apache.harmony.awt.**
-dontwarn javax.activation.**
and the apk will get created but it will not execute in the phone. Interestingly, if I remove these lines and use "-dontshrink" I continue to get these errors. I would have thought that would get rid of the problem.
I found in http://developer.android.com/tools/help/proguard.html that I am probably missing some -keep lines in my configuration but it is not obvious what these would be. Can anyone provide a clue?
The default proguard.cfg file tries to cover general cases, but you
might encounter exceptions such as ClassNotFoundException, which
happens when ProGuard strips away an entire class that your
application calls.
You can fix errors when ProGuard strips away your code by adding a
-keep line in the proguard.cfg file. For example:
-keep public class
[2013-06-19 14:19:30 - Flashum2] Proguard returned with error code 1. See console
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.datatransfer.DataProxy: can't find superclass or interface java.awt.datatransfer.Transferable
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.datatransfer.NativeClipboard: can't find superclass or interface java.awt.datatransfer.Clipboard
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.Sasl
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.Sasl
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslException
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslException
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.auth.callback.NameCallback
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.auth.callback.NameCallback
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmCallback
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmCallback
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmCallback
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmChoiceCallback
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmChoiceCallback
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmChoiceCallback
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmChoiceCallback
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.auth.callback.NameCallback
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmCallback
[2013-06-19 14:19:30 - Flashum2] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmChoiceCallback
[2013-06-19 14:19:30 - Flashum2] Warning: javax.activation.CommandInfo: can't find referenced class java.beans.Beans
[2013-06-19 14:19:30 - Flashum2] Warning: javax.activation.CommandInfo: can't find referenced class java.beans.Beans
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.GraphicsEnvironment
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.GraphicsEnvironment
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.GraphicsEnvironment
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.GraphicsEnvironment
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.datatransfer.DTK: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.datatransfer.DTK: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.datatransfer.DTK: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.datatransfer.DTK: can't
.
.
.
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-06-19 14:19:30 - Flashum2] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-06-19 14:19:30 - Flashum2] You should check if you need to specify additional program jars.
[2013-06-19 14:19:30 - Flashum2] Warning: there were 247 unresolved references to classes or interfaces.
[2013-06-19 14:19:30 - Flashum2] You may need to specify additional library jars (using '-libraryjars').
[2013-06-19 14:19:30 - Flashum2] java.io.IOException: Please correct the above warnings first.
[2013-06-19 14:19:30 - Flashum2] at proguard.Initializer.execute(Initializer.java:321)
[2013-06-19 14:19:30 - Flashum2] at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-06-19 14:19:30 - Flashum2] at proguard.ProGuard.execute(ProGuard.java:86)
[2013-06-19 14:19:30 - Flashum2] at proguard.ProGuard.main(ProGuard.java:492)
Here is the list of jars in my libs folder if that helps:
05/31/2013 10:47 AM <DIR> .
05/31/2013 10:47 AM <DIR> ..
05/15/2012 09:22 AM 34,093 acra-3.1.2.jar
01/14/2013 09:07 AM 51,643 activation.jar
01/14/2013 09:06 AM 46,184 additionnal.jar
05/25/2013 04:14 PM 501,154 android-support-v13.jar
05/15/2012 09:22 AM 312,866 commons-lang3-3.0.1.jar
05/15/2012 09:22 AM 269,014 commons-net-3.0.1.jar
05/31/2013 10:47 AM 170,927 google-api-client-1.14.1-beta.jar
05/31/2013 10:47 AM 9,068 google-api-client-android-1.14.1-beta.jar
05/31/2013 10:47 AM 137,977 google-api-services-drive-v2-rev76-1.14.2-beta.jar
05/31/2013 10:47 AM 268,450 google-http-client-1.14.1-beta.jar
05/31/2013 10:47 AM 10,072 google-http-client-android-1.14.1-beta.jar
05/31/2013 10:47 AM 7,828 google-http-client-gson-1.14.1-beta.jar
05/31/2013 10:47 AM 6,038 google-http-client-jackson-1.14.1-beta.jar
05/31/2013 10:47 AM 6,076 google-http-client-jackson2-1.14.1-beta.jar
05/31/2013 10:47 AM 64,952 google-oauth-client-1.14.1-beta.jar
05/31/2013 10:47 AM 180,110 gson-2.1.jar
05/31/2013 10:47 AM 206,797 jackson-core-2.1.3.jar
05/31/2013 10:47 AM 232,131 jackson-core-asl-1.9.11.jar
05/31/2013 10:47 AM 33,015 jsr305-1.3.9.jar
01/14/2013 09:06 AM 440,508 mail.jar
05/15/2012 09:22 AM 134,421 zip4j_1.2.5.jar
Maybe a bit late, but searching for a solution to a similar problem, I learned that you have to tell proguard to keep some classes in your libs jars. Refer to the log where it says Warning: ... and can't find referenced class ....
So in your case should be:
-keep class javax.security.** { *; }
-keep class java.beans.** { *; }
-keep class java.awt.** { *; }
and
-libraryjars libs/XYZ.jar
for every jar into /libs containing those classes.

Categories

Resources