我在我的项目中使用ORMLite,一切正常,直到使用Proguard,当我使用proguard时我收到此错误:
java.sql.SQLException:找不到具有ConnectionSource和可选类参数类my.package.myDaoImpl的公共构造函数。在课上缺少静态?
我的proguard配置文件:
# ORMLite
-keep class com.j256.**
-keepclassmembers class com.j256.** { *; }
-keep enum com.j256.**
-keepclassmembers enum com.j256.** { *; }
-keep interface com.j256.**
-keepclassmembers interface com.j256.** { *; }
-keepclassmembers class * {
public <init>(android.content.Context);
}
-keepattributes Signature
-keepattributes *Annotation*
已解决,我用它来保存我的DAO类成员,枚举和接口。
-keep class mypackage.example.**
-keepclassmembers class mypackage.example.** {*;}
-keep enum mypackage.example.**
-keepclassmembers enum mypackage.example.** { *; }
-keep interface mypackage.example.**
-keepclassmembers interface mypackage.example.** { *; }