无法使用天线预验证 LWUIT

发布于 2024-08-22 00:20:24 字数 416 浏览 6 评论 0原文

我正在使用 LWUIT 库 (j2me)。 当我使用 IDE (intelliJ) 编译代码时,一切都会编译并运行良好,但是当我使用 Antenna(最新版本)构建代码时,预验证任务失败。

日志内容如下: 预验证类 com.sun.lwuit.Button 时出错 验证器错误 com/sun/lwuit/Component.drawPainters(Lcom/sun/lwuit/Graphics;Lcom/sun/lwuit/Component;Lcom/sun/lwuit/Component;IIII)V: 找不到类 java/lang/ref/Reference

有人成功使用天线工具预验证 LWUIT 吗?

我检查了 Button 类,但看起来没问题。

有什么想法吗?

谢谢,

亚尼夫

I am using the LWUIT library (j2me).
When I compile the code with my IDE (intelliJ) everything compiles and runs fine, but when I'm building it with Antenna (latest version), I fail on the preverify task.

The log says the following:
Error preverifying class com.sun.lwuit.Button
VERIFIER ERROR com/sun/lwuit/Component.drawPainters(Lcom/sun/lwuit/Graphics;Lcom/sun/lwuit/Component;Lcom/sun/lwuit/Component;IIII)V:
Cannot find class java/lang/ref/Reference

Did anyone succeeded preverifying LWUIT with antenna tools?

I checked the Button class, but it seems ok.

Any ideas?

Thanks,

Yaniv

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

浅忆流年 2024-08-29 00:20:24

我也遇到了同样的问题。

在 wtkbuild 或 wtkpreverify 之前添加以下内容

<property name="wtk.all.enabled" value="true"/>

简而言之,您需要某些库/JSR 来预验证需要位于类路径中的代码。天线仅添加您指定的内容,并通过设置上述属性来添加所有内容。

I had the very same problem.

Add the following before your wtkbuild or wtkpreverify

<property name="wtk.all.enabled" value="true"/>

In a nutshell you need certain libraries/JSR's to preverify your code which need to be in the classpath. Antenna adds only the ones you specify and by setting the above propertie you add all.

无畏 2024-08-29 00:20:24

最可能的问题是您正在针对 CLDC 1.0 库进行构建(例如,如果您使用的是 WTK 2.5.2,则为 cldcapi10.jar)。

java.lang.Reference 是 CLDC 1.1 类 - LWUIT 需要 CLDC 1.1,因为它到处都使用 Wea​​kReference(以及其他一些 1.1 独有的功能)。

The most likely problem is that you are building against a CLDC 1.0 library (e.g. cldcapi10.jar if you're using WTK 2.5.2).

java.lang.Reference is a CLDC 1.1 class - LWUIT requires CLDC 1.1 because it uses WeakReference all over the place (as well as a couple of other 1.1 only features).

音栖息无 2024-08-29 00:20:24

通常是在您没有包含所需的库之一时引起的,猜测您很可能从类路径中省略了 svg 类

Usually caused when you have not included one of the required libraries, at a guess you have most likely omitted the svg classes from your classpath

小情绪 2024-08-29 00:20:24

There is a bug in MTJ version that you are using . You can try updating MTJ with this

http://download.eclipse.org/mtj/updates/1.1.2/stable/ and this

http://download.eclipse.org/eclipse/updates/3.6

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文