【问题标题】:How to solve J2ME java.lang.NoClassDefFoundError: com/sun/lwuit/layouts/Layout error?如何解决 J2ME java.lang.NoClassDefFoundError: com/sun/lwuit/layouts/Layout 错误?
【发布时间】:2013-02-22 09:17:25
【问题描述】:

我的 midlet 和 DB java 页面没有显示任何错误,但是在运行模拟器时它会加载并突然终止并出现以下错误...

请帮我解决

Running with storage root C:\Users\Acer\j2mewtk\2.5.2\appdb\MediaControlSkin
Running with locale: English_United States.1252
Running in the identified_third_party security domain
java.lang.NoClassDefFoundError: com/sun/lwuit/layouts/Layout
    at com.sun.midp.midlet.MIDletState.createMIDlet(+29)
    at com.sun.midp.midlet.Scheduler.schedule(+52)
    at com.sun.midp.main.Main.runLocalClass(+28)
    at com.sun.midp.main.Main.main(+80)
Execution completed.
3409264 bytecodes executed
25 thread switches
1683 classes in the system (including system classes)
17718 dynamic objects allocated (532816 bytes)
3 garbage collections (458688 bytes collected)

【问题讨论】:

  • 您能否在 jar 中包含 LWUIT 类?

标签: java-me


【解决方案1】:


在您的构建路径中添加 LWUIT.jar 文件。
添加干净并构建后,然后测试您的应用程序

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-12-16
    • 2015-10-12
    • 2013-08-07
    • 2014-06-08
    • 1970-01-01
    • 2015-11-20
    • 2020-05-19
    • 1970-01-01
    相关资源
    最近更新 更多