I'm getting this error:
Unexpected error while performing partial evaluation:
Class = [org/apache/log4j/chainsaw/Main]
Method = [<init>()V]
Exception = [java.lang.IllegalArgumentException] (Can't find any super classes of [org/apache/log4j/chainsaw/LoadXMLAction] (not even immediate super class [javax/swing/AbstractAction]))
Error: Can't find any super classes of [org/apache/log4j/chainsaw/LoadXMLAction] (not even immediate super class [javax/swing/AbstractAction])
Part of my proguard configuration:
-dontwarn javax.jms.**
-dontwarn com.sun.jdmk.comm.**
-dontwarn android.support.v4.**
-dontwarn com.google.api.client.googleapis.extensions.**
-dontwarn org.apache.harmony.**
-dontwarn com.sun.**
-dontwarn org.simpleframework.**
-dontwarn com.google.android.gms.**
-dontwarn org.apache.log4j.lf5.viewer.**
-dontwarn java.beans.**
-dontwarn org.apache.log4j.**
-libraryjars 'D:\Workspace\android\libs\acra-4.5.0.jar'
-libraryjars 'D:\Workspace\android\libs\activation.jar'
-libraryjars 'D:\Workspace\android\libs\additionnal.jar'
-libraryjars 'D:\Workspace\android\libs\android-logging-log4j-1.0.3.jar'
-libraryjars 'D:\Workspace\android\libs\android-support-v4.jar'
-libraryjars 'D:\Workspace\android\libs\annotations.jar'
-libraryjars 'D:\Workspace\android\libs\google-api-client-android-1.12.0-beta.jar'
-libraryjars 'D:\Workspace\android\libs\jtar-1.1.jar'
-libraryjars 'D:\Workspace\android\libs\log4j-1.2.15.jar'
-libraryjars 'D:\Workspace\android\libs\mail.jar'
-libraryjars 'D:\Workspace\android\libs\simple-xml-2.6.9.jar'
The library for log4j is there, so what could be the problem?
UPDATE
As I have found the problem is raised during optimalization. Shrink and obfuscation is working.
For those who need a fast solution on using Log4J on Android, Krivers' update actually served as a hint: setting -dontoptimize in ProGuard configuration turns off optimization and thus avoids the error (although this should only be considered as a workaround).
In fact, the Android Tools Project Site had also suggested to turn off ProGuard optimization:
Dalvik performs many of its own optimizations, and some of the optimizations performed by ProGuard are incompatible with Dalvik, so to avoid hard-to-figure-out bugs (and because the net performance gain is usually small), the default configuration turns off optimization.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With