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.**
Related
I want to use proguard for my application , I'm using eclipse . This is the config file :
-dontwarn com.parse.**
-keep class com.facebook.** {
*;
}
-keepattributes Signature
#When not preverifing in a case-insensitive filing system, such as Windows. This tool will unpack your processed jars,(if using windows you should then use):
-dontusemixedcaseclassnames
#Specifies not to ignore non-public library classes. As of version 4.5, this is the default setting
-dontskipnonpubliclibraryclasses
# 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
-dontwarn android.support.**
#Specifies to write out some more information during processing. If the program terminates with an exception, this option will print out the entire stack trace, instead of just the exception message.
-verbose
#The -optimizations option disables some arithmetic simplifications that Dalvik 1.0 and 1.5 can't handle. Note that the Dalvik VM also can't handle aggressive overloading (of static fields).
#To understand or change this check http://proguard.sourceforge.net/index.html#/manual/optimizations.html
#-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
# 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.
#To repackage classes on a single package
#-repackageclasses ''
#Uncomment if using annotations to keep them.
#-keepattributes *Annotation*
#Keep classes that are referenced on the AndroidManifest
-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.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
#Compatibility library
-keep public class * extends android.support.v4.app.Fragment
-keep public class * extends android.app.Fragment
#To maintain custom components names that are used on layouts XML.
#Uncomment if having any problem with the approach below
#-keep public class custom.components.package.and.name.**
# 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*();
}
#To remove debug logs:
-assumenosideeffects class android.util.Log {
public static *** d(...);
public static *** v(...);
public static *** w(...);
}
#To avoid changing names of methods invoked on layout's onClick.
# Uncomment and add specific method names if using onClick on layouts
#-keepclassmembers class * {
# public void onClickButton(android.view.View);
#}
#Maintain java native methods
-keepclasseswithmembernames class * {
native <methods>;
}
#To maintain custom components names that are used on layouts XML:
-keep public class * extends android.view.View {
public <init>(android.content.Context);
}
-keep public class * extends android.view.View {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keep public class * extends android.view.View {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
#Maintain enums
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
#To keep parcelable classes (to serialize - deserialize objects to sent through Intents)
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
#Keep the R
-keepclassmembers class **.R$* {
public static <fields>;
}
When I export the application and build the apk file ,it gives me the "Progaurd return error 1" and the in the consul it returns these errors :
Proguard returned with error code 1. See console
Warning: com.parse.FacebookAuthenticationProvider$1: can't find superclass or interface com.facebook.android.Facebook$ServiceListener
Warning: com.parse.FacebookAuthenticationProvider$2: can't find superclass or interface com.facebook.Session$StatusCallback
Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find superclass or interface com.facebook.Request$Callback
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$Builder
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$Builder
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$Builder
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.SharedPreferencesTokenCachingStrategy
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.SharedPreferencesTokenCachingStrategy
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$Builder
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$Builder
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.TokenCachingStrategy
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.TokenCachingStrategy
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.TokenCachingStrategy
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.TokenCachingStrategy
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.SessionState
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.TokenCachingStrategy
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.SessionState
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook$ServiceListener
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$StatusCallback
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.SessionDefaultAudience
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session$OpenRequest
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.android.Facebook
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.TokenCachingStrategy
Warning: com.parse.FacebookAuthenticationProvider: can't find referenced class com.facebook.Session
Warning: com.parse.FacebookAuthenticationProvider$1: can't find referenced class com.facebook.android.Facebook$ServiceListener
Warning: com.parse.FacebookAuthenticationProvider$1: can't find referenced class com.facebook.android.Facebook
Warning: com.parse.FacebookAuthenticationProvider$1: can't find referenced class com.facebook.android.FacebookError
Warning: com.parse.FacebookAuthenticationProvider$1: can't find referenced class com.facebook.android.FacebookError
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.SessionState
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.SessionState
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Request
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Request
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Request
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Session$StatusCallback
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.SessionState
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Request
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Session
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Request$Callback
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Session
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.SessionState
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Request
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.Session
Warning: com.parse.FacebookAuthenticationProvider$2: can't find referenced class com.facebook.SessionState
Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Response
Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.FacebookRequestError
Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Response
Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.model.GraphObject
Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Request$Callback
Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Response
Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.FacebookRequestError
Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.model.GraphObject
Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Request
Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Response
Warning: com.parse.FacebookAuthenticationProvider$2$1: can't find referenced class com.facebook.Response
Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.Session
Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.Session
Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.android.Facebook
Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.Session
Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.android.Facebook
Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.android.Facebook
Warning: com.parse.ParseFacebookUtils: can't find referenced class com.facebook.Session
You should check if you need to specify additional program jars.
Warning: there were 82 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)
There are some external libraries that I use in my application , I just need the progaurd for obfuscation
Could you help me to solve this problem ?
Replace
-keep class com.facebook.** {
*;
}
with,
-dontwarn com.facebook.**
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
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!
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
I tried to use Proguard in my Android project, i setup Proguard using command line 'android update project /path/to/project' and file proguard.cfg was created in project's root directory. (In my Eclipse with Android 2.3 sdk, when create a new project, proguard.cfg file is not automatically created so i have to add it manually using command line).
When i export the project, i got the following errors
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.io.Buffer
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields$Field
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields$Field
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields$Field
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.Address
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.io.Buffer
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.Address
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields$Field
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't find referenced class org.mortbay.jetty.HttpFields
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.CommonsLoggingLoggerFactory: can't find referenced class org.apache.commons.logging.LogFactory
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.CommonsLoggingLoggerFactory: can't find referenced class org.apache.commons.logging.LogFactory
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.SLF4JLoggerFactory: can't find referenced class org.slf4j.LoggerFactory
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.SLF4JLoggerFactory: can't find referenced class org.slf4j.LoggerFactory
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.JettyOAuthConsumer: can't find referenced class org.mortbay.jetty.client.HttpExchange
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLoggerFactory: can't find referenced class org.apache.log4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLoggerFactory: can't find referenced class org.apache.log4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.signature.OAuthMessageSigner: can't find referenced class org.apache.commons.codec.binary.Base64
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.signature.OAuthMessageSigner: can't find referenced class org.apache.commons.codec.binary.Base64
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.signature.OAuthMessageSigner: can't find referenced class org.apache.commons.codec.binary.Base64
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.signature.OAuthMessageSigner: can't find referenced class org.apache.commons.codec.binary.Base64
[2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.signature.OAuthMessageSigner: can't find referenced class org.apache.commons.codec.binary.Base64
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.SLF4JLogger: can't find referenced class org.slf4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Level
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Level
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-02-06 09:02:49 - TestProject] Warning: twitter4j.internal.logging.Log4JLogger: can't find referenced class org.apache.log4j.Logger
[2011-02-06 09:02:49 - TestProject] You should check if you need to specify additional program jars.
[2011-02-06 09:02:49 - TestProject] Warning: there were 59 unresolved references to classes or interfaces.
[2011-02-06 09:02:49 - TestProject] You may need to specify additional library jars (using '-libraryjars'),
[2011-02-06 09:02:49 - TestProject] or perhaps the '-dontskipnonpubliclibraryclasses' option.
[2011-02-06 09:02:49 - TestProject] java.io.IOException: Please correct the above warnings first.
[2011-02-06 09:02:49 - TestProject] at proguard.Initializer.execute(Initializer.java:308)
[2011-02-06 09:02:49 - TestProject] at proguard.ProGuard.initialize(ProGuard.java:210)
[2011-02-06 09:02:49 - TestProject] at proguard.ProGuard.execute(ProGuard.java:85)
[2011-02-06 09:02:49 - TestProject] at proguard.ProGuard.main(ProGuard.java:499)
These error messages point to four external jars used in my project
(.classpath)
<classpathentry kind="lib" path="/Users/lorensiuswlt/Android/android-sdk-mac_x86/libs/Twitter/signpost-commonshttp4-1.2.1.1.jar"/>
<classpathentry kind="lib" path="/Users/lorensiuswlt/Android/android-sdk-mac_x86/libs/Twitter/signpost-core-1.2.1.1.jar"/>
<classpathentry kind="lib" path="/Users/lorensiuswlt/Android/android-sdk-mac_x86/libs/Twitter/signpost-jetty6-1.2.1.1.jar"/>
<classpathentry kind="lib" path="/Users/lorensiuswlt/Android/android-sdk-mac_x86/libs/Twitter/twitter4j-core-2.1.6.jar"/>
Here is my proguard.cfg file
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-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
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
I've tried some solutions found on web by adding '-libraryjars' option, ex:
-libraryjars /Users/lorensiuswlt/Android/android-sdk-mac_x86/libs/Twitter/twitter4j-core-2.1.6.jar
but it won't help.
Any solutions?
Your library jars refer to yet more library jars (Mortbay, SLF4J, Apache Commons Logging, Log4j, ...) Adding these jars with extra '-libraryjars' options should solve the problem.
If you are absolutely sure that your code doesn't use these libraries, you can specify '-ignorewarnings' or '-dontwarn', e.g.
-dontwarn org.mortbay.**
-dontwarn org.slf4j.**
-dontwarn org.apache.log4j.**
-dontwarn org.apache.commons.logging.**
-dontwarn org.apache.commons.codec.binary.**