Proguard - Persistenceexception: Constructor Not Matched For Class
I am using retrofit2.0 in my app with simpleframework.xml library. The problem is when I run the app without proguard it works fine however when I run proguard I get the following
Solution 1:
I guess that your problem is that you are not keeping any attributes and that obviously depends in which attributes you are using. In my case, this is how I dealt with it, let me know if it works for you:
## https://square.github.io/retrofit/ ##
-dontwarn retrofit2.**-keep class retrofit2.** { *; }-keepattributes Signature-keepattributes Exceptions
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
## Simple XML ##
-dontwarn org.simpleframework.xml.stream.**-keep public class org.simpleframework.** { *; }-keep class org.simpleframework.xml.** { *; }-keep class org.simpleframework.xml.core.** { *; }-keep class org.simpleframework.xml.util.** { *; }-keepattributes ElementList, Root, *Annotation*-keepclassmembers class * {
@org.simpleframework.xml.* *;
}
Post a Comment for "Proguard - Persistenceexception: Constructor Not Matched For Class"