错误:找不到常见的超类 [英] Error: Can't find common super class of

查看:855
本文介绍了错误:找不到常见的超类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Proguard处理MS Windows桌面应用程序(使用Eclipse提供的SWT lib的Java 6 SE)。我收到以下严重错误:

 执行部分评估时出现意外错误:
Class = [org / eclipse / swt / widgets / DateTime]
方法= [< init>(Lorg / eclipse / swt / widgets / Composite; I)V]
例外= [java.lang.IllegalArgumentException](找不到常见的超类[java / lang / StringBuffer]和[org / eclipse / swt / internal / win32 / TCHAR])
错误:无法找到[java / lang / StringBuffer]和[org]的常见超类/ eclipse / swt / internal / win32 / TCHAR]
----------------------------

当我尝试Google的错误时,它只出现在整个网络上的两个位置,这让我大吃一惊。
我是使用Proguard和Java代码优化工具的新手。
任何想法和建议如何解决这个问题,将不胜感激。提前致谢。



以上错误现已解决,使用-dontskipnonpubliclibraryclasses



- 最终更新:



我现在仍然收到另一个错误。
现在整个输出如下:

  D:\ eclipse_projs \ java_obfuscate\gci> gci。 bat 
ProGuard,版本4.4
读取程序jar [D:\\\ Eclipse_projs \ java_obfuscate\gci \gci.jar]
读取库jar [D:\ jre1.6.0_07 \ lib\rt.jar]
评估指令时出现意外错误:
Class = [org / eclipse / swt / widgets / Synchronizer]
Method = [runAsyncMessages(Z)Z]
指令= [60] aload_1 v1
异常= [java.lang.IllegalArgumentException](值不是参考值[proguard.evaluation.value.UnknownIntegerValue])
执行部分评估时出现意外错误:
Class = [org / eclipse / swt / widgets / Synchronizer]
Method = [runAsyncMessages(Z)Z]
Exception = [java.lang.IllegalArgumentException](Value不是参考value [proguard.evaluation.value.UnknownIntegerValue])
错误:值不是参考值[pro guard.evaluation.value.UnknownIntegerValue]

D:\ eclipse_projs \ java_obfuscate\gci>

这是一个我无法理解的问题:(任何帮助将不胜感激。



我使用的选项如下:

  -dontskipnonpubliclibraryclasses 
-dontskipnonpubliclibraryclassmembers
-optimizationpasses 3
-overloadaggressively
-repackageclasses''
-allowaccessmodification
-dontnote


解决方案

尝试在命令行中添加选项 -dontskipnonpubliclibraryclasses 。 / p>

来自 Proguard手册


限制

为了提高效率,
ProGuard总是忽略任何私有或
包可见库同时
读取库罐。如果其中任何一个
被公共库
类扩展,然后再扩展
输入类,ProGuard会抱怨
它无法找到它们。在这种情况下,
你必须使用
-dontskipnonpubliclibraryclasses
选项,甚至可能是
-dontskipnonpubliclibraryclassmembers 选项。图形用户界面
包含这些设置的复选框。



I am trying to process with Proguard a MS Windows desktop application (Java 6 SE using the SWT lib provided by Eclipse). And I get the following critical error:

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]
----------------------------

When I tried to Google the error, it came out only on two spots on the entire web, that astonished me greatly. I am newbie using Proguard and Java code optimization tools at all. Any thoughts and suggestions how to fix this, will be appreciated. Thanks in advance.

Above error is now fixed, with the using of "-dontskipnonpubliclibraryclasses"

--final update:

I still get another error now. The whole output is now the folowing:

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>

This is a problem that i cannot understand for certain :( any help will be much appreciated.

The options I use are the following:

-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-optimizationpasses 3
-overloadaggressively
-repackageclasses ''
-allowaccessmodification
-dontnote

解决方案

Try adding the option -dontskipnonpubliclibraryclasses to your command line.

From the Proguard Manual:

Limitations

For efficiency, ProGuard always ignores any private or package visible library classes while reading library jars. If any of them are extended by public library classes, and then extended again by input classes, ProGuard will complain it can't find them. In that case, you'll have to use the -dontskipnonpubliclibraryclasses option, and maybe even the -dontskipnonpubliclibraryclassmembers option. The graphical user interface has checkboxes for these settings.

这篇关于错误:找不到常见的超类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆