我正在尝试使用 Proguard 处理 MS Windows 桌面应用程序(使用 Eclipse 提供的 SWT 库的 Java 6 SE)。我收到以下严重错误:
Unexpected error while performing partial evaluation:
Class = [org/eclipse/swt/widgets/DateTime]
Method = [<init>(Lorg/eclipse/swt/widgets/Composite;I)V]
Exception = [java.lang.IllegalArgumentException] (Can't find common super class of [java/lang/StringBuffer] and [org/eclipse/swt/internal/win32/TCHAR])
Error: Can't find common super class of [java/lang/StringBuffer] and [org/eclipse/swt/internal/win32/TCHAR]
----------------------------
当我试图用谷歌搜索这个错误时,它只出现在整个网络上的两个地方,这让我大吃一惊。我完全是使用 Proguard 和 Java 代码优化工具的新手。任何如何解决此问题的想法和建议将不胜感激。提前致谢。
上述错误现已修复,使用“-dontskipnonpubliclibraryclasses”
--最终更新:
我现在仍然遇到另一个错误。现在整个输出如下:
D:\eclipse_projs\java_obfuscate\gci>gci.bat
ProGuard, version 4.4
Reading program jar [D:\eclipse_projs\java_obfuscate\gci\gci.jar]
Reading library jar [D:\jre1.6.0_07\lib\rt.jar]
Unexpected error while evaluating instruction:
Class = [org/eclipse/swt/widgets/Synchronizer]
Method = [runAsyncMessages(Z)Z]
Instruction = [60] aload_1 v1
Exception = [java.lang.IllegalArgumentException] (Value is not a reference value [proguard.evaluation.value.UnknownIntegerValue])
Unexpected error while performing partial evaluation:
Class = [org/eclipse/swt/widgets/Synchronizer]
Method = [runAsyncMessages(Z)Z]
Exception = [java.lang.IllegalArgumentException] (Value is not a reference value [proguard.evaluation.value.UnknownIntegerValue])
Error: Value is not a reference value [proguard.evaluation.value.UnknownIntegerValue]
D:\eclipse_projs\java_obfuscate\gci>
这是一个我无法确定的问题:(任何帮助将不胜感激。
我使用的选项如下:
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-optimizationpasses 3
-overloadaggressively
-repackageclasses ''
-allowaccessmodification
-dontnote