当我试图在ProGuard中混淆简单的DataLoader.class文件时,我得到这个错误:
Reading program directory [C:UsersuzytkownikDocumentsNetBeansProjectsProTestbuildclassesFilesDataLoader.class]
Warning: class [DataLoader.class] unexpectedly contains class [Files.DataLoader]
Warning: there were 1 classes in incorrectly named files.
You should make sure all file names correspond to their class names.
The directory hierarchies must correspond to the package hierarchies.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unexpectedclass)
If you don't mind the mentioned classes not being written out,
you could try your luck using the '-ignorewarnings' option.
Please correct the above warnings first.
项目如下:http://www49.zippyshare.com/v/14668241/file.html
我很感激你的帮助。Warning: class [META-INF/versions/9/module-info.class] unexpectedly contains class [module-info]
这就是我遇到的问题,我尝试了下面提到的几个选项:
- -keep class -info
- -keepattributes模块*
- -dontwarn模块信息
我的选择是3.
不知道为什么,但它解决了我的问题,我能够使罐子。
当你升级一些东西,比如我升级了spring-boot版本,项目开始失败时,这个问题就会出现。
请检查maven依赖项
使用-injars
和-libraryjars
选项,您应该指定类的适当基目录(或jar),就像类路径一样。本例中为classes
,不是classesFilesDataLoader.class
。
请参阅ProGuard手册>故障处理>警告:类文件…