无法使用天线预验证 LWUIT
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我也遇到了同样的问题。
在 wtkbuild 或 wtkpreverify 之前添加以下内容
简而言之,您需要某些库/JSR 来预验证需要位于类路径中的代码。天线仅添加您指定的内容,并通过设置上述属性来添加所有内容。
I had the very same problem.
Add the following before your wtkbuild or wtkpreverify
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.
最可能的问题是您正在针对 CLDC 1.0 库进行构建(例如,如果您使用的是 WTK 2.5.2,则为 cldcapi10.jar)。
java.lang.Reference 是 CLDC 1.1 类 - LWUIT 需要 CLDC 1.1,因为它到处都使用 WeakReference(以及其他一些 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).
通常是在您没有包含所需的库之一时引起的,猜测您很可能从类路径中省略了 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
您使用的 MTJ 版本存在错误。您可以尝试使用此
http://download.eclipse.org/mtj 更新 MTJ /updates/1.1.2/stable/ 和这个
http://download.eclipse。 org/eclipse/updates/3.6
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