My app works perfectly without proguard. When I use proguard with ormlite, I have some problems. In the logcat appear:
java.sql.SQLException: Field class for 'name' must be a parameterized Collection
In proguard file I put:
-keep class com.j256.**
-keepclassmembers class com.j256.** { *; }
-keep enum com.j256.**
-keepclassmembers enum com.j256.** { *; }
-keep interface com.j256.**
-keepclassmembers interface com.j256.** { *; }
Could you help me? Thanks
I've found you need to keep more than just the Annotation attribute
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
Below is my default ormlite proguard statements. You need to keep the files that describe your data as well
# OrmLite uses reflection
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
-keep class com.j256.**
-keepclassmembers class com.j256.** { *; }
-keep enum com.j256.**
-keepclassmembers enum com.j256.** { *; }
-keep interface com.j256.**
-keepclassmembers interface com.j256.** { *; }
-keep class com.mycompany.myproduct.data.entity.**
-keepclassmembers class com.mycompany.myproduct.data.entity.** { *; }
-keep enum com.mycompany.myproduct.data.entity.**
-keepclassmembers enum com.mycompany.myproduct.data.entity.** { *; }
-keep interface com.mycompany.myproduct.data.entity.**
-keepclassmembers interface com.mycompany.myproduct.data.entity.** { *; }
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