Proguard - Can't Find Any Super Classes
Solution 1:
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.
Solution 2:
The class org.apache.log4j.chainsaw.LoadXMLAction extends the class javax.swing.AbstractAction. This latter class is part of Swing, which is not present in Android. Therefore, LoadXMLAction can never be used in practice. Furthermore, ProGuard can't analyze this class properly without its complete class hierarchy.
Answer : you should avoid adding LoadXMLAction to your application libraries, either by not putting the corresponding Apache jar in your libs directory, or by filtering out the class (and similar classes) from the ProGuard injars
options (more difficult in the standard build process), or by removing the class from the jar.
Post a Comment for "Proguard - Can't Find Any Super Classes"