cor.ted中的一个desgined Form在theme.res文件中

时间:2016-12-21 10:14:14

标签: codenameone

我没有更新这个themes.res(使用CN设计师一段时间)突然1天后我在我的代码中做了一些更新并发送了一个Android版本进行重建,我发现其中一个表单不起作用..当表单显示时,应用程序通过

在空对象引用上的

'java.lang.String com.codename1.q.r.be()'。

经过调查,我发现UI Designer能够打开theme.res文件,但无法显示特定表单“Report”。

enter image description here

我在命令行中重新运行设计器,以便通过UI Designer查看任何错误,它是:

~]$ java -jar ~/.codenameone/designer_1.jar 
2016-12-21 17:51:09.562:INFO:oejs.Server:jetty-8.0.y.z-SNAPSHOT
2016-12-21 17:51:09.623:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:9000 STARTING
Dec 21, 2016 5:51:09 PM org.jdesktop.application.LocalStorage getId
WARNING: unspecified resource Application.id using ResourceEditorApp
java.lang.RuntimeException: Component not found use UIBuilder.registerCustomComponent(, class);
    at com.codename1.ui.util.UIBuilder.createComponentType(UIBuilder.java:1530)
    at com.codename1.ui.util.UIBuilder.createComponent(UIBuilder.java:977)
    at com.codename1.ui.util.UIBuilder.createComponent(UIBuilder.java:1377)
    at com.codename1.ui.util.UIBuilder.createComponent(UIBuilder.java:1377)
    at com.codename1.ui.util.UIBuilder.createContainer(UIBuilder.java:413)
    at com.codename1.ui.util.UIBuilder.createContainer(UIBuilder.java:398)
    at com.codename1.designer.ResourceEditorView$11.getIconImage(ResourceEditorView.java:429)
    at com.codename1.designer.HorizontalList.createButton(HorizontalList.java:285)
    at com.codename1.designer.HorizontalList.refresh(HorizontalList.java:164)
    at com.codename1.designer.HorizontalList$2.treeNodesInserted(HorizontalList.java:139)
    at com.codename1.ui.util.EditableResources.fireTreeNodeAdded(EditableResources.java:3328)
    at com.codename1.designer.ResourceEditorView$LoadResourceFileAction.afterComplete(ResourceEditorView.java:4208)
    at com.codename1.ui.resource.util.BlockingAction$4.run(BlockingAction.java:91)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.RuntimeException: Component not found use UIBuilder.registerCustomComponent(, class);
    at com.codename1.ui.util.UIBuilder.createComponentType(UIBuilder.java:1530)
    at com.codename1.ui.util.UIBuilder.createComponent(UIBuilder.java:977)
    at com.codename1.ui.util.UIBuilder.createComponent(UIBuilder.java:1377)
    at com.codename1.ui.util.UIBuilder.createComponent(UIBuilder.java:1377)
    at com.codename1.ui.util.UIBuilder.createContainer(UIBuilder.java:413)
    at com.codename1.ui.util.UIBuilder.createContainer(UIBuilder.java:398)
    at com.codename1.designer.UserInterfaceEditor.<init>(UserInterfaceEditor.java:586)
    at com.codename1.ui.util.EditableResources.getResourceEditor(EditableResources.java:3207)
    at com.codename1.designer.ResourceEditorView.setSelectedResource(ResourceEditorView.java:657)
    at com.codename1.designer.HorizontalList$1.actionPerformed(HorizontalList.java:117)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:308)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.Component.processMouseEvent(Component.java:6525)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6290)
    at java.awt.Container.processEvent(Container.java:2234)
    at java.awt.Component.dispatchEventImpl(Component.java:4881)
    at java.awt.Container.dispatchEventImpl(Container.java:2292)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
    at java.awt.Container.dispatchEventImpl(Container.java:2278)
    at java.awt.Window.dispatchEventImpl(Window.java:2750)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at com.codename1.designer.UserInterfaceEditor.<init>(UserInterfaceEditor.java:597)
    at com.codename1.ui.util.EditableResources.getResourceEditor(EditableResources.java:3207)
    at com.codename1.designer.ResourceEditorView.setSelectedResource(ResourceEditorView.java:657)
    at com.codename1.designer.HorizontalList$1.actionPerformed(HorizontalList.java:117)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:308)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.Component.processMouseEvent(Component.java:6525)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6290)
    at java.awt.Container.processEvent(Container.java:2234)
    at java.awt.Component.dispatchEventImpl(Component.java:4881)
    at java.awt.Container.dispatchEventImpl(Container.java:2292)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
    at java.awt.Container.dispatchEventImpl(Container.java:2278)
    at java.awt.Window.dispatchEventImpl(Window.java:2750)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

有人请建议发生什么事?

1 个答案:

答案 0 :(得分:1)

要解决此问题,您可以删除并重新创建该表单。假设你找到一种方法来一致地重现这个,我想知道它是什么。

在将项目复制到一边之前,打开该项目。假设您正在使用NetBeans,请转到项目属性,然后选择将旧的GUI构建器项目转换为Codename One部分下项目属性中的新GUI构建器项目的选项。

完成后,转到视图的files部分并查看项目。打开res/guibuilder,找到与此表单匹配的.gui文件。在其中查看您应该看到一个具有“有问题”类型值的组件...如果没有,请编辑您的问题并将.gui文件的XML放在那里。