Configuring ProGuard

I am using ksoap2 library in my android project. When I use ProGuard to build my application, some ksoap2 functionality no longer works.

As you know, the progaurding application, when it contains the ksoap2 library, causes some conflicts. I used 3 different proguard-configs to solve this problem and then removed the xmlpull in the library, but still the soap objects in ksoap2 didn't work after the reconfiguration.

So my problem is this: "ksoap2 doesn't work correctly after proguard" and I want: "proguard-config or some suggestion for this problem"

Here are some of the codes I used for proguard-comfig:

-libraryjars libs\ksoap2-android-assembly.jar
-dontwarn org.kobjects.**
-dontwarn org.ksoap2.**
-dontwarn org.kxml2.**
-dontwarn org.xmlpull.v1.**

      

then I also add this:

-keep class org.kobjects.** { *; }
-keep class org.ksoap2.** { *; }
-keep class org.kxml2.** { *; }
-keep class org.xmlpull.** { *; }

      

then I also add this:

-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses    
-dontoptimize
-dontpreverify

      

and i also try to remove xmlpull but ksoap2 doesn't work correctly after app proguarding.

Edit

1- I have no error and build signed apk using ProGuard. 2- Every thing works correctly when I run the application or sign the apk without proguard.

+3


source to share





All Articles