本文介绍了Proguard的与OrmLite在Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我应该如何使用ProGuard的与ormlite库在Android?
How should I use proguard with ormlite library on Android?
尝试这样的:
-keep class com.j256.**
-keepclassmembers class com.j256.**
-keep enum com.j256.**
-keepclassmembers enum com.j256.**
-keep interface com.j256.**
-keepclassmembers interface com.j256.**
但我得到:
03-23 20:23:54.518:E / AndroidRuntime(3032):java.lang.RuntimeException的:无法启动的活动ComponentInfo {cz.eman.android.cepro / cz.eman.android.cepro.activity.StationsOverviewActivity }:java.lang.IllegalStateException:找不到构造函数上下文参数的辅助类类KB
我也尝试添加这样的:
-keepclassmembers class * { public <init>(android.content.Context); }
但我得到另一个classmembers错误。
But I get another classmembers errors.
推荐答案
感谢您了很多像这样的职位,有助于我们提前一步一步来。
Thank you a lot for posts like this that help us to advance step by step.
我已经想出了其他的解决方案后,我已经尝试了最后一个没有成功:
I've came up with other solution after i have tried the last one without success:
# OrmLite uses reflection
-keep class com.j256.**
-keepclassmembers class com.j256.** { *; }
-keep enum com.j256.**
-keepclassmembers enum com.j256.** { *; }
-keep interface com.j256.**
-keepclassmembers interface com.j256.** { *; }
我希望它可以帮助别人。
I hope it can help someone.
这篇关于Proguard的与OrmLite在Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!