-keep class 和 -dontwarn 有什么区别 [英] what is the difference between -keep class and -dontwarn
问题描述
嘿,我是 proGuard 的新手,我用它来保护我的代码免受逆向工程,但是当我构建我签名的 apk 时,我在启用 proGuard 时遇到了很多错误,我用谷歌搜索了我的问题说
Hey I'm new with proGuard , I use it to protect my code from reverse engineering , but when I built my signed apk I got a lot of errors when I enabled proGuard ,I have googled my problem I've found answers that says use -dontwarn for the classes that showing in the error message but after seeing the documentation from proGuard it says
如果您不想过滤掉有问题的类,您可以使用 -ignorewarnings 选项,甚至 -dontwarn 选项试试运气.只有在您真正知道自己在做什么时才使用这些选项.
If you don't feel like filtering out the problematic classes, you can try your luck with the -ignorewarnings option, or even the -dontwarn option. Only use these options if you really know what you're doing though.
我不知道我在做什么这是我的 proguard-rules.pro
文件
and I don't know what I'm doing
and here is my proguard-rules.pro
file
-dontwarn okio.**
-dontwarn org.apache.**
-dontwarn com.appodeal.**
-dontwarn com.parse.**
-dontwarn com.squareup.**
而且我看到一些答案说使用 -keep class
and I've seen some answers says use -keep class
谁能解释一下
推荐答案
-keep class
保留指定的类和类成员.
-keep class
Preserve the specified classes and class members.
-dontwarn
根本不要警告未解析的引用.
-dontwarn
Don't warn about unresolved references at all.
这里有更多信息http://proguard.sourceforge.net/manual/refcard.html一个>
这篇关于-keep class 和 -dontwarn 有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!