代码混淆后GreenDao 报错:Could not init DAOConfig
项目使用greendao打包混淆的时候,安装成功之后启动崩溃,查看log显示 Could not init DAOConfig,这个是混淆产生的问题,在网上查看解决方法需要加入混淆配置
-keep class org.greenrobot.greendao.**{*;}
-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao{
public static java.lang.String TABLENAME;
}
-keep class **$Properties
# If you do not use SQLCipher:
-dontwarn org.greenrobot.greendao.database.**
# If you do not use RxJava:
-dontwarn rx.**
添加之后依然崩溃,后增加配置解决问题
-keep class 包名.greendao.gen.**{*;}
希望能够帮助到和我遇到同样问题的人