使用 proguard 混淆 jar 文件
我使用 proguard 来混淆我的 jar 文件。 在处理过程中,我收到以下错误:
Initializing...
Warning: tdvep.jmNb: can't find referenced class QSYGWO
Warning: tdvep.qmfsfjttKdvEpNz: can't find referenced class FVTYBN
Warning: tdvep.qsfboBcSw$qsffmtssf: can't find referenced class UGKTLU
Warning: tdvep.qsffmtssf: can't find referenced class DREQUQ
Warning: there were 4 unresolved references to classes or interfaces.
You may need to specify additional library jars (using '-libraryjars').
请先更正上述警告。 所以指导我解决这个警告。
I used proguard
to obfuscate my jar file.
During processing I got the following errors:
Initializing...
Warning: tdvep.jmNb: can't find referenced class QSYGWO
Warning: tdvep.qmfsfjttKdvEpNz: can't find referenced class FVTYBN
Warning: tdvep.qsfboBcSw$qsffmtssf: can't find referenced class UGKTLU
Warning: tdvep.qsffmtssf: can't find referenced class DREQUQ
Warning: there were 4 unresolved references to classes or interfaces.
You may need to specify additional library jars (using '-libraryjars').
Please correct the above warnings first.
So guide me to resolve this warnings.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否检查过 ProGuard 疑难解答部分 - 处理时出现问题。
如果存在
对类或接口的未解析引用
,您很可能忘记指定一个重要的库。为了正确处理,必须指定代码引用的所有库,包括 Java 运行时库。要指定库,请使用 -libraryjars 选项。例如,如果
ProGuard
抱怨找不到javax.crypto
类,您可能仍然需要在更常见的旁边指定jce.jar rt.jar.
如果您缺少某个库并且您绝对确定它没有被使用,您可以使用
-ignorewarnings
选项碰碰运气,甚至可以使用 <代码>-不要警告选项。仅当您确实知道自己在做什么时才使用这些选项。例如,如果您正在为
Android
进行开发,并且 ProGuard 抱怨它找不到java.awt 类
,那么您正在使用的某个库正在引用java.awt
。这有点可疑,因为 Android 根本没有这个包,但如果您的应用程序仍然可以工作,您可以让ProGuard
使用"-dontwarn java.awt.** 接受它“
。Have you checked the ProGuard troubleshooting section - Problems while processing.
If there are
unresolved references to classes or interfaces
, you most likely forgot to specify an essential library. For proper processing, all libraries that are referenced by your code must be specified, including the Java run-time library. For specifying libraries, use the-libraryjars
option.For example, if
ProGuard
complains that it can't find ajavax.crypto
class, you probably still have to specifyjce.jar, next to the more common rt.jar.
If you're missing a library and you're absolutely sure it isn't used anyway, 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.For example, if you're developing for
Android
, and ProGuard complains that it can't find ajava.awt class
, then some library that you are using is referring tojava.awt
. This is a bit shady, since Android doesn't have this package at all, but if your application works anyway, you can letProGuard
accept it with"-dontwarn java.awt.**"
.