我发现您需要保留的不仅仅是Annotation属性
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
下面是我默认的 ormlite proguard 语句。您还需要保留描述数据的文件
# 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.** { *; }