skip to Main Content

I enabled R8 plugging for obfuscation

I got an exception when I am trying to generate the signed apk

"Library class android.content.res.XmlResourceParser implements program class org.xmlpull.v1.XmlPullParser"

I have added below proGuard rule to the proguard-rules.pro file

-dontwarn org.xmlpull.v1.**
-dontnote org.xmlpull.v1.**
-keep class org.xmlpull.** { *; }
-keepclassmembers class org.xmlpull.** { *; }

and My release build specification

buildTypes {
        release {
            useProguard false
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
    }

Help to fix this issue

2

Answers


  1. gradle.properties

    android.enableR8.fullMode=false
    
    Login or Signup to reply.
  2. Surprisingly, I have the same issue and adding these lines, mentioned by the question poster to my proguard-rules.pro solved it :

    -dontwarn org.xmlpull.v1.**
    -dontnote org.xmlpull.v1.**
    -keep class org.xmlpull.** { *; }
    -keepclassmembers class org.xmlpull.** { *; }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search