Search code examples
javaandroidproguardxmlpullparser

Android, Proguard & XmlPullParser: NoSuchMethodError


I am using XmlPullParser and when the app pass throught the Proguard, and the apk is running on device, it give me the following error:

08-06 17:10:26.717: E/AndroidRuntime(2527):
   Caused by: java.lang.NoSuchMethodError: org.xmlpull.v1.XmlPullParser.d

I have added -ignorewarnings in my proguard.cfg or otherwise there is no way to pass the Proguard.

Here is a link to my proguard.cfg file.


Solution

  • You obfuscated away a method you shouldn't have. You need to keep the pull parser code intact. Add:

    -keep public class org.xmlpull.**
    

    to your proguard.cfg file.