I have an application that is using ksoap2 library, everything working fine but when exporting application from Eclipse, it shows this
Proguard returned with error code 1. See console
Note: there were 4 duplicate class definitions.
Warning: library class android.content.res.XmlResourceParser extends or implements program class org.xmlpull.v1.XmlPullParser
Warning: library class android.content.Intent depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlSerializer
Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.content.res.ColorStateList depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.AnimationDrawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.BitmapDrawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.ColorDrawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
After browsing the ksoap2-android-assembly-3.1.1-jar-with-dependencies.jar
I found that it has own org.xmlpull.v1
package and with 4 files those are already defined in android.jar since API 1.
Why did the author of ksoap added these classes if they existed already ? O_o if he had to do some changes it would be nice if package name was also changed.
Anyway, 2 things I can do to solve this. Either use -dontwarn
in proguard config file. Which seems not a good idea. Or download the source code and delete that package name and build a jar.
Or maybe there is something else I can do ?
Thank you
I had a similiar problem and I solved it using this:
-ignorewarnings
-keep class org.kobjects.** { *; }
-keep class org.ksoap2.** { *; }
-keep class org.kxml2.** { *; }
-keep class org.xmlpull.** { *; }
Open .jar
in Rar or any Zip application. Delete the xmlpull
folder. Thats it :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With