gpt4 book ai didi

java - 目录层次结构必须与包层次结构相对应

转载 作者:行者123 更新时间:2023-12-02 01:26:33 24 4
gpt4 key购买 nike

我在尝试混淆我的 Java 程序(用于 Minecraft 服务器的 spigot API 插件)时收到以下错误

Note: you're writing the processed class files to a directory [C:\Users\user\Desktop\OBFUSCATE\out].
This will likely cause problems with obfuscated mixed-case class names.
You should consider writing the output to a jar file, or otherwise
specify '-dontusemixedcaseclassnames'.
Reading program jar [C:\Users\user\Desktop\OBFUSCATE\pvptimer.jar]
Reading library jar [C:\Program Files\Java\jdk1.8.0_211\jre\lib\rt.jar]
Reading library jar [C:\Users\user\Desktop\OBFUSCATE\paper-1613.jar]
Warning: class [META-INF/versions/9/com/destroystokyo/paperclip/Main.class] unexpectedly contains class [com.destroystokyo.paperclip.Main]
Note: duplicate definition of library class [com.destroystokyo.paperclip.Main]
Warning: class [META-INF/versions/9/com/destroystokyo/paperclip/Agent.class] unexpectedly contains class [com.destroystokyo.paperclip.Agent]
Note: duplicate definition of library class [com.destroystokyo.paperclip.Agent]
Reading library jar [C:\Users\user\Desktop\OBFUSCATE\patched_1.12.2.jar]
Note: duplicate definition of library class [org.json.simple.ItemList]
Note: duplicate definition of library class [org.json.simple.JSONArray]
Note: duplicate definition of library class [org.json.simple.JSONAware]
Note: duplicate definition of library class [org.json.simple.JSONObject]
Note: duplicate definition of library class [org.json.simple.JSONStreamAware]
Note: duplicate definition of library class [org.json.simple.JSONValue]
Note: duplicate definition of library class [org.json.simple.parser.ContainerFactory]
Note: duplicate definition of library class [org.json.simple.parser.ContentHandler]
Note: duplicate definition of library class [org.json.simple.parser.JSONParser]
Note: duplicate definition of library class [org.json.simple.parser.ParseException]
Note: duplicate definition of library class [org.json.simple.parser.Yylex]
Note: duplicate definition of library class [org.json.simple.parser.Yytoken]
Note: there were 14 duplicate class definitions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
Warning: there were 2 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.

我只是不确定如何修复此错误。我查看并发现了一些声称能够解决此问题的在线教程,但没有效果。

如果有人遇到过这个问题并且能够解决它,请分享你的智慧!

编辑**:

选择框忽略有关可能错误输入的警告后,会进行混淆,但在加载插件时,我收到此错误:

image

最佳答案

这很可能是由于您要混淆的代码所依赖的库,或者项目中的其他代码依赖于您现在混淆的代码,但其引用指向未混淆的 jar 的方法名称。如果那个飞过你的头,请告诉我,如果可以的话,我会尽力解释得更好一些。

一个小例子:

OldClass { //This class, has reference to LibClass.callMethod
void oldMethod() {
LibClass.callMethod();
}
}

LibClass {
static void callMethod() {
//now if this gets obfuscated,
//and the above code is never renamed to this new obfuscated name
// you will get errors like you are seeing (The method doesn't exist anymore)

}
}

关于java - 目录层次结构必须与包层次结构相对应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56829098/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com