【发布时间】:2011-02-05 04:52:58
【问题描述】:
我正在尝试使用 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
【问题讨论】:
-
如果您没有获得完整的堆栈跟踪,请将 -verbose 添加到命令行。
标签: java optimization obfuscation proguard