Class ProGuard-意外包含类

Class ProGuard-意外包含类,class,warnings,obfuscation,proguard,Class,Warnings,Obfuscation,Proguard,当我试图混淆ProGuard中的simple DataLoader.class文件时,出现以下错误: Reading program directory [C:\Users\uzytkownik\Documents\NetBeansProjects\ProTest\build\classes\Files\DataLoader.class] Warning: class [DataLoader.class] unexpectedly contains class [Files.DataLoader

当我试图混淆ProGuard中的simple DataLoader.class文件时,出现以下错误:

Reading program directory [C:\Users\uzytkownik\Documents\NetBeansProjects\ProTest\build\classes\Files\DataLoader.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.
以下是项目:


我将非常感谢您的帮助。

使用选项
-injars
-libraryjars
,您应该指定类的正确基本目录(或jar),就像类路径一样。在这种情况下:
classes
,而不是
classes\Files\DataLoader.class

请参阅ProGuard手册>故障排除>

这就是我遇到的问题,我尝试了下面提到的几个选项:

  • -保留班级模块信息
  • -keepattributes模块*
  • -dontwarn模块信息
  • 对我有效的选项是3

    不知道为什么,但它解决了我的问题,我能够使罐

    当您升级类似于我升级spring boot版本的东西,并且项目开始失败时,就会出现这个问题


    请同时检查maven依赖项。

    如果您在android上工作,请添加此build.gradle

     buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    

    您能提供一个带有正确的基本目录和输入jar的
    -injar
    示例吗?在查看文档时,我没有找到任何示例
     buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }