Pat*_*aDJ 11 java obfuscation optimization proguard
我正在尝试使用Proguard处理MS Windows桌面应用程序(使用Eclipse提供的SWT lib的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]
----------------------------
Run Code Online (Sandbox Code Playgroud)
当我试图谷歌的错误,它只出现在整个网络上的两个点,这让我非常惊讶.我是新手,使用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>
Run Code Online (Sandbox Code Playgroud)
这是一个我无法理解的问题:(任何帮助将非常感激.
我使用的选项如下:
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-optimizationpasses 3
-overloadaggressively
-repackageclasses ''
-allowaccessmodification
-dontnote
Run Code Online (Sandbox Code Playgroud)
尝试将该选项添加-dontskipnonpubliclibraryclasses
到命令行.
来自Proguard手册:
限制
为了提高效率,ProGuard在读取库jar时始终忽略任何私有或包可见库类.如果它们中的任何一个被公共库类扩展,然后再由输入类扩展,ProGuard会抱怨它找不到它们.在这种情况下,您将不得不使用该-dontskipnonpubliclibraryclasses
选项,甚至可能使用 该-dontskipnonpubliclibraryclassmembers
选项.图形用户界面具有这些设置的复选框.