Android Proguard: XmlPullParser issues

146 views Asked by At

I have enabled Proguard for my project, It produces multiple warnings related to org.xmlPullParser package, see picture:

enter image description here

TL;DR: How do I solve this, I tried many things already.

UPDATE Opening a completely new project and setting up the following gives the same warnings:

  • Running Android Tests

  • Build Variant 'Release'

  • minifyEnabled true & useProguard true

Details: Reading about the subject, I found claims that this happens because the same code already exists inside the main android.jar and that the XmlPullParser library was included in a 3rd part lib separately.

I did two things to try and address the issue: 1. I removed dependencies to the library that uses XmlPullParser. 2. I verified with Gradle task 'dependencies' that XmlPullParser is nowhere in the internal dependencies.

The problem is, it does not help at all and I'm still receiving this message.

None of the following rules helped (I just amused in them to see if something helps, they were liberally turned on and off):

-dontwarn org.kobjects.**

-dontwarn org.ksoap2.**

-dontwarn org.kxml2.**

-dontwarn org.xmlpull.v1.**

-keep class org.kobjects.** { *; }

-keep class org.ksoap2.** { *; }

-keep class org.kxml2.** { *; }

-keep class org.xmlpull.** { *; }

-dontusemixedcaseclassnames

-dontskipnonpubliclibraryclasses

-dontoptimize

-dontpreverify

-libraryjars android.jar(!org/xmlpull/v1/**)

-dontwarn org.xmlpull.v1.**

-dontnote org.xmlpull.v1.**

-keep class org.xmlpull.** { *; }
0

There are 0 answers