为了账号安全,请及时绑定邮箱和手机立即绑定

proguard 注意:库类的重复定义

proguard 注意:库类的重复定义

慕斯王 2021-07-13 17:09:45
我尝试在 Spring Boot App 上启动 ProGuard 并得到错误:  [proguard] Reading library jar [C:\Program Files\Java\jdk1.8.0_151\jre\lib\rt.jar]     [proguard] Note: duplicate definition of library class [javax.annotation.Generated]     [proguard] Note: duplicate definition of library class [javax.annotation.PostConstruct]     [proguard] Note: duplicate definition of library class [javax.annotation.PreDestroy]     [proguard] Note: duplicate definition of library class [javax.annotation.Resource$AuthenticationType]     [proguard] Note: duplicate definition of library class [javax.annotation.Resource]     [proguard] Note: duplicate definition of library class [javax.annotation.Resources]     [proguard] Note: there were 8 duplicate class definitions.     [proguard]       (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)     [proguard] Warning: there were 2 classes in incorrectly named files.     [proguard]          You should make sure all file names correspond to their class names.     [proguard]          The directory hierarchies must correspond to the package hierarchies.     [proguard]          (http://proguard.sourceforge.net/manual/troubleshooting.html#unexpectedclass)     [proguard]          If you don't mind the mentioned classes not being written out,     [proguard]          you could try your luck using the '-ignorewarnings' option.     [proguard] Error: Please correct the above warnings first.为什么我会收到这个错误,我该如何解决?
查看完整描述

2 回答

?
ITMISS

TA贡献1871条经验 获得超8个赞

您可以执行以下操作来摆脱这种情况:

  1. 如果添加 proguard 选项,-printconfiguration configuration.txt您将看到所有 proguard 添加的内容。

  2. 根据您从上述步骤中收到的信息,您可以更正相同的

要么

您可以使用以下选项来停止看到这些警告消息:此处的文档

-dontwarn javax.annotation.*
-dontnote javax.annotation.*

请查看问题以了解有关您现在面临的情况的更多详细信息。


查看完整回答
反对 回复 2021-07-29
  • 2 回答
  • 0 关注
  • 958 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信