When my application is build with ProGuard, it fails with following message.
I use a default proguard.cfg generated by Android SDK with some -libraryjars.
What can I do for it?
[2011-03-17 09:27:04 - MyProject] Proguard returned with error code 1. See console
[2011-03-17 09:27:04 - MyProject] Note: there were 4247 duplicate class definitions.
[2011-03-17 09:27:04 - MyProject] Warning: library class android.content.res.XmlResourceParser extends or implements program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.content.Intent depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.graphics.drawable.AnimationDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.graphics.drawable.BitmapDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
[2011-03-17 09:27:04 - MyProject] You should check if you need to specify additional program jars.
[2011-03-17 09:27:04 - MyProject] Warning: there were 9 instances of library classes depending on program classes.
[2011-03-17 09:27:04 - MyProject] You must avoid such dependencies, since the program classes will
[2011-03-17 09:27:04 - MyProject] be processed, while the library classes will remain unchanged.
[2011-03-17 09:27:04 - MyProject] java.io.IOException: Please correct the above warnings first.
[2011-03-17 09:27:04 - MyProject] at proguard.Initializer.execute(Initializer.java:321)
[2011-03-17 09:27:04 - MyProject] at proguard.ProGuard.initialize(ProGuard.java:211)
[2011-03-17 09:27:04 - MyProject] at proguard.ProGuard.execute(ProGuard.java:86)
[2011-03-17 09:27:04 - MyProject] at proguard.ProGuard.main(ProGuard.java:492)
Apparently, org.xmlpull.v1.XmlPullParser is not a program class.
I've updated ProGuard to newest version(4.6), but have same warnings.
add this line to proguard-project.txt
-dontwarn org.xmlpull.v1.**
and this line to project.properties
proguard.config=proguard-project.txt
I solved this using this settings in the proguard file:
-dontwarn org.kobjects.**
-dontwarn org.ksoap2.**
-dontwarn org.kxml2.**
-dontwarn org.xmlpull.v1.**
-keep class org.kobjects.** { *; }
-keep class org.ksoap2.** { *; }
-keep class org.kxml2.** { *; }
-keep class org.xmlpull.** { *; }
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontoptimize
-dontpreverify
I don't have the solution yet for proguard run via eclipse for android, but if you run proguard manually from the command line, you can put the following in your proguard.cfg:
-basedirectory /home/pjv/workspace/collectionista-repo/collectionista-main
-injars /tmp/android_4500371803543847111.jar
-injars libs/joda-time-1.6.jar(!META-INF/MANIFEST.MF)
-injars libs/FlurryAgent.jar(!META-INF/MANIFEST.MF)
-injars libs/veecheck-2.0.jar(!META-INF/MANIFEST.MF)
-injars libs/commons-lang-2.4.jar(!META-INF/MANIFEST.MF,!META-INF/NOTICE.txt,!META-INF/LICENSE.txt)
-injars libs/OIAbout-lib-temporary.jar(!META-INF/MANIFEST.MF)
-injars libs/libGoogleAnalytics.jar(!META-INF/MANIFEST.MF)
-injars libs/xstream-1.3.1.jar(!META-INF/MANIFEST.MF)
-injars libs/ZQL_custom.jar(!META-INF/MANIFEST.MF)
-injars libs/xpp3_min-1.1.4c.jar(!META-INF/MANIFEST.MF)
-injars libs/GoogleAdMobAdsSdk-4.1.0.jar(!META-INF/MANIFEST.MF)
-injars libs/bugsense-trace.jar(!META-INF/MANIFEST.MF)
-outjars /tmp/android_1348923171424559204.jar
-libraryjars /opt/android-sdk/android-sdk-linux_x86-1.6_r1/platforms/android-12/android.jar(!org/xmlpull/v1/XmlPullParser.class,!org/xmlpull/v1/XmlPullParserException.class)
Note how XmlPullParser.class is filtered from the android API jar.
Don't worry about the warnings related to XmlPullParser just yet. Fix the errors and other warnings first, and if you must, use -ignorewarnings in your proguard.cfg.
I think your jar package include XmlPullParser class, and android.jar also include this.
So you can remove org.xmlpull.* classes in the jar package, and build again.
According to the partial log that you provide, the Android runtime class org.xmlpull.v1.XmlPullParser has ended up in your program code. You should make sure it is not present in bin/classes or in some jar in lib, because it is already present in the library jar android.jar.
Furthermore, you have 4247 duplicate class definitions. This is probably due to specifying "some -libraryjars" as you mention. I'm guessing these library jars are already included automatically by the build script, so you shouldn't specify them again.
The dependency already exist on your folder,
exclude it like below:
dependencies {
configurations {
all*.exclude group: 'xmlpull', module: 'xmlpull'
}
}
Sometimes it happens when you include one of your test libraries as a regular module dependency. For example don't do:
implementation 'com.android.support.test:runner:1.0.2' //wrong!!
do:
androidTestImplementation 'com.android.support.test:runner:1.0.2' //right (:
for me I could solve it by removing my previous modified build.gradle
I removed:
minifyEnabled true
shrinkResources true
and returned to the original setting
minifyEnabled false
Related
Note: there were 1188 duplicate class definitions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
Initializing...
Note: the configuration refers to the unknown class 'rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef'
Note: the configuration refers to the unknown class 'rx.internal.util.atomic.LinkedQueueNode'
Note: the configuration refers to the unknown class 'rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef'
Note: the configuration refers to the unknown class 'rx.internal.util.atomic.LinkedQueueNode'
Note: the configuration refers to the unknown class 'dagger.internal.Binding'
Maybe you meant the fully qualified name 'com.sun.xml.internal.ws.wsdl.writer.document.Binding'?
Maybe you meant the fully qualified name 'com.sun.xml.internal.ws.wsdl.writer.document.http.Binding'?
Maybe you meant the fully qualified name 'dagger.internal.codegen.Binding'?
Maybe you meant the fully qualified name 'javax.naming.Binding'?
Maybe you meant the fully qualified name 'javax.xml.ws.Binding'?
Maybe you meant the fully qualified name 'org.eclipse.jdt.internal.compiler.lookup.Binding'?
Maybe you meant the fully qualified name 'org.omg.CosNaming.Binding'?
Note: the configuration refers to the unknown class 'dagger.internal.ModuleAdapter'
Note: the configuration refers to the unknown class 'dagger.internal.StaticInjection'
Note: the configuration refers to the unknown class 'Object'
Maybe you meant the fully qualified name 'java.lang.Object'?
Maybe you meant the fully qualified name 'org.omg.CORBA.Object'?
Note: the configuration refers to the unknown class 'org.greenrobot.eventbus.Subscribe'
Maybe you meant the fully qualified name 'com.squareup.otto.Subscribe'?
Maybe you meant the fully qualified name 'com.google.common.eventbus.Subscribe'?
Note: the configuration refers to the unknown class 'org.greenrobot.eventbus.ThreadMode'
Note: the configuration refers to the unknown class 'org.greenrobot.eventbus.util.ThrowableFailureEvent'
Note: the configuration refers to the unknown class 'com.google.android.gms.location.LocationServices'
Note: the configuration refers to the unknown class 'com.abed.hexagonrecyclerview.view.HorizontallyAdaptableHexagonImageView'
Note: the configuration refers to the unknown class 'com.abed.hexagonrecyclerview.view.VerticallyAdaptableHexagonImageView'
Note: the configuration refers to the unknown class 'com.facebook.drawee.view.SimpleDraweeView'
Warning: library class dagger.producers.monitoring.internal.Monitors$1 extends or implements program class javax.inject.Provider
Note: bo.app.aw: can't find dynamically referenced class com.amazon.device.messaging.ADM
Note: com.google.android.exoplayer.extractor.ExtractorSampleSource: can't find dynamically referenced class com.google.android.exoplayer.ext.flac.FlacExtractor
Note: com.google.android.gms.internal.zzast: can't find dynamically referenced class android.os.SystemProperties
Note: com.google.android.youtube.player.internal.aa: can't find dynamically referenced class com.google.android.youtube.api.locallylinked.LocallyLinkedFactory
Note: com.squareup.okhttp.internal.Platform: can't find dynamically referenced class com.android.org.conscrypt.SSLParametersImpl
Note: com.squareup.okhttp.internal.Platform: can't find dynamically referenced class org.apache.harmony.xnet.provider.jsse.SSLParametersImpl
Note: com.squareup.okhttp.internal.Platform: can't find dynamically referenced class sun.security.ssl.SSLContextImpl
Note: okhttp3.internal.platform.AndroidPlatform: can't find dynamically referenced class com.android.org.conscrypt.SSLParametersImpl
Note: okhttp3.internal.platform.AndroidPlatform: can't find dynamically referenced class org.apache.harmony.xnet.provider.jsse.SSLParametersImpl
Note: okhttp3.internal.platform.AndroidPlatform$CloseGuard: can't find dynamically referenced class dalvik.system.CloseGuard
Note: okhttp3.internal.platform.Platform: can't find dynamically referenced class sun.security.ssl.SSLContextImpl
Note: com.google.android.gms.dynamite.DynamiteModule accesses a declared field 'MODULE_ID' dynamically
Maybe this is program field 'com.google.android.gms.dynamite.descriptors.com.google.android.gms.flags.ModuleDescriptor { java.lang.String MODULE_ID; }'
Note: com.google.android.gms.dynamite.DynamiteModule accesses a declared field 'MODULE_VERSION' dynamically
Maybe this is program field 'com.google.android.gms.dynamite.descriptors.com.google.android.gms.flags.ModuleDescriptor { int MODULE_VERSION; }'
Note: com.google.android.gms.dynamite.DynamiteModule accesses a declared field 'sClassLoader' dynamically
Maybe this is program field 'com.google.android.gms.dynamite.DynamiteModule$DynamiteLoaderClassLoader { java.lang.ClassLoader sClassLoader; }'
Note: com.google.gson.internal.UnsafeAllocator accesses a declared field 'theUnsafe' dynamically
Note: the configuration explicitly specifies 'sun.misc.Unsafe' to keep library class 'sun.misc.Unsafe'
Note: the configuration explicitly specifies 'org.xmlpull.v1.**' to keep library class 'org.xmlpull.v1.XmlPullParser'
Note: the configuration explicitly specifies 'org.xmlpull.v1.**' to keep library class 'org.xmlpull.v1.XmlPullParserException'
Note: the configuration explicitly specifies 'org.xmlpull.v1.**' to keep library class 'org.xmlpull.v1.XmlPullParserFactory'
Note: the configuration explicitly specifies 'org.xmlpull.v1.**' to keep library class 'org.xmlpull.v1.XmlSerializer'
Note: there were 15 references to unknown classes.
You should check your configuration for typos.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)
Note: there were 5 library classes explicitly being kept.
You don't need to keep library classes; they are already left unchanged.
(http://proguard.sourceforge.net/manual/troubleshooting.html#libraryclass)
Note: there were 11 unresolved dynamic references to classes or interfaces.
You should check if you need to specify additional program jars.
(http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
Note: there were 4 accesses to class members by means of introspection.
You should consider explicitly keeping the mentioned class members
(using '-keep' or '-keepclassmembers').
(http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember)
Warning: there were 1 instances of library classes depending on program classes.
You must avoid such dependencies, since the program classes will
be processed, while the library classes will remain unchanged.
(http://proguard.sourceforge.net/manual/troubleshooting.html#dependency)
Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.
:app:transformClassesAndResourcesWithProguardForRelease FAILED
:app:transformClassesAndResourcesWithProguardForRelease (Thread[Daemon worker Thread 3,5,main]) completed. Took 4.602 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> Job failed, see logs for details
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 7.685 secs
Stopped 0 worker daemon(s).
I solved this error by adding few lines in proguard. I was using twitter library in gradle.
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
-printmapping mapping.txt
-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**
-dontwarn com.squareup.okhttp.**
-dontwarn com.google.appengine.api.urlfetch.**
-dontwarn rx.**
-dontwarn retrofit.**
-keepattributes Signature
-keepattributes *Annotation*
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-keep class retrofit.** { *; }
-keepclasseswithmembers class * {
#retrofit.http.* <methods>;
}
Make sure to upgrade to the latest Gradle version to use the
annotationProcessor syntax:
dependencies {
compile "com.google.dagger:dagger:2.9"
annotationProcessor "com.google.dagger:dagger-compiler:2.9"
provided 'javax.annotation:jsr250-api:1.0'
}
Taken from android wiki in codepath
When try to build the release build with proguard enable getting below warning and couldn't build the APK successfully.
Warning:io.branch.referral.ExtendedAnswerProvider: can't find referenced class com.crashlytics.android.answers.shim.KitEvent
Warning:io.branch.referral.ExtendedAnswerProvider: can't find referenced class com.crashlytics.android.answers.shim.AnswersOptionalLogger
Warning:io.branch.referral.ExtendedAnswerProvider: can't find referenced class com.crashlytics.android.answers.shim.KitEventLogger
Warning:io.branch.referral.ExtendedAnswerProvider: can't find referenced class com.crashlytics.android.answers.shim.AnswersOptionalLogger
Warning:io.branch.referral.ExtendedAnswerProvider: can't find referenced class com.crashlytics.android.answers.shim.KitEventLogger
Warning:io.branch.referral.ExtendedAnswerProvider: can't find referenced class com.crashlytics.android.answers.shim.KitEvent
Warning:there were 14 unresolved references to classes or interfaces.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:java.lang.RuntimeException: Job failed, see logs for details
Error:java.io.IOException: Please correct the above warnings first.
add
-dontwarn com.crashlytics.android.answers.shim.**
to the proguard file
If you want to exclude Crashlytics from Proguard you can use these 2 lines
-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**
Check out Fabric's Proguard page
I'm able to create builds for my android app, but when I turn on proguard i'm getting numerouos warnings, and then the build fails. The warnings are like the ones below:
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpEntity
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.params.HttpParams
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.conn.ClientConnectionManager
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.methods.HttpUriRequest
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpResponse
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.methods.HttpUriRequest
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpResponse
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpHost
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpResponse
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpHost
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpResponse
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.methods.HttpUriRequest
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.ResponseHandler
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.methods.HttpUriRequest
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.ResponseHandler
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpHost
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.ResponseHandler
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpHost
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.client.ResponseHandler
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning: library class android.net.http.AndroidHttpClient depends on program class org.apache.http.entity.AbstractHttpEntity
It's complaining about libraries that were used in my project. My settings are below:
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
proguardFile file('proguard-rules.txt')
signingConfig signingConfigs.release
}
}
Within my proguard-rules.txt I have the following:
-libraryjars libs
All of my libraries are stored in the libs folder. Is there anything else i'm doing wrong?
inspect the jars , creating a packages list in libs you are using.
Then try adding following for those packages in the list in your proguard config file:
-dontwarn org.codehaus.jackson.**
...
-keep class org.codehaus.jackson.** { *; }
Your libraries contain duplicates of the android.http classes, which are already present in the Android runtime. This may cause conflicts. You should remove the duplicate libraries from your project.
See the ProGuard manual > Troubleshooting > Warning: library class ... depends on program class ...
I am getting these weird error from proguard while exporting android app. I have edited config file. But I couldn't find what the remaining errors are.
I have added external Jars, configured -dontwarn , now I couldn't find the remaining issues.
[2013-11-22 17:13:31 - MyProject] Note: there were 1267 duplicate class definitions.
[2013-11-22 17:13:31 - MyProject] Warning: library class android.net.http.AndroidHttpClient extends or implements program class org.apache.http.client.HttpClient
[2013-11-22 17:13:31 - MyProject] You should check if you need to specify additional program jars.
[2013-11-22 17:13:31 - MyProject] Warning: there were 1 instances of library classes depending on program classes.
[2013-11-22 17:13:31 - MyProject] You must avoid such dependencies, since the program classes will
[2013-11-22 17:13:31 - MyProject] be processed, while the library classes will remain unchanged.
[2013-11-22 17:13:31 - MyProject] java.io.IOException: Please correct the above warnings first.
[2013-11-22 17:13:31 - MyProject] at proguard.Initializer.execute(Initializer.java:321)
[2013-11-22 17:13:31 - MyProject] at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-11-22 17:13:31 - MyProject] at proguard.ProGuard.execute(ProGuard.java:86)
[2013-11-22 17:13:31 - MyProject] at proguard.ProGuard.main(ProGuard.java:492)
My ProGuard Config file:
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#
-libraryjars /libs/commons-codec-1.6.jar
-libraryjars /libs/commons-logging-1.1.3.jar
-libraryjars /libs/fluent-hc-4.3.jar
-libraryjars /libs/gson-2.2.4.jar
-libraryjars /libs/httpclient-4.3.jar
-libraryjars /libs/httpclient-cache-4.3.jar
-libraryjars /libs/httpmime-4.3.jar
-libraryjars /libs/picasso-2.0.1.jar
-libraryjars /libs/picasso-2.0.1.jar
-dontwarn javax.xml.stream.events.**
-dontwarn com.squareup.okhttp.**
-dontwarn com.google.android.gms.auth.GoogleAuthUtil
-dontwarn com.squareup.picasso.OkHttpLoader
-dontwarn com.squareup.picasso.OkHttpDownloader
-dontwarn org.apache.commons.logging.impl.AvalonLogger
-dontwarn org.apache.commons.logging.impl.Log4JLogger
-dontwarn org.apache.commons.logging.impl.LogKitLogger
-dontwarn org.apache.commons.logging.impl.ServletContextCleaner
-dontwarn org.apache.http.impl.auth.GGSSchemeBase
-dontwarn org.apache.http.impl.auth.KerberosScheme
-dontwarn org.apache.http.impl.auth.SPNegoScheme
-dontwarn org.apache.http.impl.client.cache.ehcache.EhcacheHttpCacheStorage
-dontwarn org.apache.http.impl.client.cache.memcached.MemcachedHttpCacheStorage
-dontwarn org.apache.http.impl.auth.NegotiateScheme
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
Try adding this in the proguard config file.
-libraryjars libs\android-support-v4.jar
-libraryjars <java.home>\lib\rt.jar
-dontwarn org.apache.commons.**
Also, why do you have -libraryjars /libs/picasso-2.0.1.jar twice?
Have a look at this answer
I get always with ProGuard following error:
[2012-05-19 17:50:13 - xxx] Warning: there were 13 unresolved references to program class members.
[2012-05-19 17:50:13 - xxx] Your input classes appear to be inconsistent.
[2012-05-19 17:50:13 - xxx] You may need to recompile them and try again.
[2012-05-19 17:50:13 - xxx] Alternatively, you may have to specify the option
[2012-05-19 17:50:13 - xxx] '-dontskipnonpubliclibraryclassmembers'.
[2012-05-19 17:50:13 - xxx] Error: Please correct the above warnings first.
[2012-05-19 17:55:40 - xxx] Proguard returned with error code 1. See console
[2012-05-19 17:55:40 - xxx] Note: there were 239 duplicate class definitions.
[2012-05-19 17:55:40 - xxx] Warning: org.apache.http.entity.mime.FormBodyPart: can't find superclass or interface org.apache.james.mime4j.message.BodyPart
[2012-05-19 17:55:40 - xxx] Warning: org.apache.http.entity.mime.HttpMultipart: can't find superclass or interface org.apache.james.mime4j.message.Multipart
[2012-05-19 17:55:40 - xxx] Warning: org.apache.http.entity.mime.MinimalField: can't find superclass or interface org.apache.james.mime4j.parser.Field
My proguard.cfg file is:
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class com.actionbarsherlock.** { *; }
-keep interface com.actionbarsherlock.** { *; }
-keepattributes *Annotation*
-keepattributes SourceFile, LineNumberTable
-libraryjars /libs/crittercism_v2_0_1.jar
-libraryjars /libs/dropbox-android-sdk-1.2.2.jar
-libraryjars /libs/FlurryAgent.jar
-libraryjars /libs/httpmime-4.0.3.jar
-libraryjars /libs/json_simple-1.1.jar
I've already added all my external libs so why am I getting always these errors?
Can anybody help?
EDIT 21.05.2012:
The problem is if you add "Dropbox" jar AND "ActionBarSherlock".
If I add only "Dropbox", I have no problem.
If I add only "ActionBarSherlock", I have no problem.
But if I added both, I would get the errors above.
The problem exists if you have added "ActionBarSherlock" and "DropBox" jars to your project.
To solve the problem, add the below line to your proguard-project.txt file:
-dontwarn org.apache.**
The warning will be ignored and it will work because each of the jars alone are working.
So I think, this will be the bug in ProGuard, if both are added.
Possibly you need to :
-keep class org.apache.http.**
-keep interface org.apache.http.**
That is assuming of course ProGuard is complaining about the apache classes. Admittedly I am guessing somewhat as I'm no expert on ProGuard.