-keep class和-dontwarn有什么区别 [英] what is the difference between -keep class and -dontwarn

查看:602
本文介绍了-keep class和-dontwarn有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我是proGuard的新手,我用它来保护代码免受逆向工程的侵害, 但是,当我构建签名的apk时,启用proGuard时出现很多错误,我用谷歌搜索了我的问题,找到了对错误消息中显示的类使用-dontwarn的答案,但在查看了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选项试试运气.不过,只有在您真正知道自己在做什么的情况下才使用这些选项.

我不知道我在做什么 这是我的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆