当我尝试加载一个simpel Codename1 Hello World教程应用程序时,我收到此错误:
java.io.IOException: Error while trying to read theme property:
at com.codename1.ui.util.Resources.loadTheme(Resources.java:1475)
at com.codename1.ui.util.Resources.openFileImpl(Resources.java:303)
at com.codename1.ui.util.Resources.openFile(Resources.java:269)
at com.codename1.ui.util.Resources.<init>(Resources.java:189)
at com.codename1.ui.util.Resources.open(Resources.java:740)
at com.codename1.ui.util.Resources.openLayered(Resources.java:702)
at com.codename1.ui.util.Resources.openLayered(Resources.java:666)
at com.codename1.ui.plaf.UIManager.initFirstTheme(UIManager.java:1564)
at dk.cp3.appname.MyApplication.init(MyApplication.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.codename1.impl.javase.Executor$1$1.run(Executor.java:117)
at com.codename1.ui.Display.processSerialCalls(Display.java:1152)
at com.codename1.ui.Display.mainEDTLoop(Display.java:969)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
我查看了网络,发现有些人遇到了同样的错误,但却将其与NetBeans联系起来。我使用Eclipse 4.7。
答案 0 :(得分:0)
右键单击该项目,选择Codename One - &gt;代号一个设置 - &gt;基本 - &gt;更新客户端库。
这应该将本地安装的库更新为最新的库,它应该与当前主题一起正常工作。确保您的插件也是最新的,尽管这不应该影响该异常。