After dexguarding my application I got this error when running my application
01-01 04:47:02.948: E/AndroidRuntime(8125): FATAL EXCEPTION: Thread-9
01-01 04:47:02.948: E/AndroidRuntime(8125): java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilder.setEntityResolver
01-01 04:47:02.948: E/AndroidRuntime(8125): at o.郋.櫯(:134)
01-01 04:47:02.948: E/AndroidRuntime(8125): at o.郋.鷭(:82)
01-01 04:47:02.948: E/AndroidRuntime(8125): at android.SHAREDLIBS.network.ISOManager.LoadISOXMLMessageFactory(:637)
01-01 04:47:02.948: E/AndroidRuntime(8125): at o.Ț.run(:294)
Alright, no issues. Simply exclude that class from being obfuscated. But it doesn't matter what I try to include in the dexguard-project.txt file, I still keep getting the error.
A few things I've tried
-keep public class javax.xml.parsers.**
-keep public class javax.xml.parsers.DocumentBuilder
-keep public abstract class javax.xml.parsers.DocumentBuilder
-keep class javax.xml.parsers.DocumentBuilder.** { *; }
-keep public abstract class javax.xml.parsers.DocumentBuilder.** { *; }
-keep public class javax.xml.parsers.** { *; }
-keep public class javax.xml.parsers.DocumentBuilder.** {public private protected *;}
-keepclassmembers class javax.xml.parsers.DocumentBuilder { public abstract void setEntityResolver (org.xml.sax.EntityResolver); }
-keepclassmembers public abstract class javax.xml.parsers.DocumentBuilder { public abstract void setEntityResolver (org.xml.sax.EntityResolver); }
I am running it with the following flags.
-dontshrink
-dontoptimize
So obviously the issue is in the obfuscation step.
And yes, if I disable obfuscation, it works without any issues.
I am obviously doing something wrong because even after I explicitly requests to exclude it, I still keep getting the error.
Am I excluding it correctly ? Is there any other thing that looks wrong ?