我正在尝试使用新的 GUI 构建器制作一个代号为 one 的新应用程序。然而,最近新的 GUI builder 没有出现,除了我第一次创建一个新表单。
我尝试重新安装 codenameone 插件、java sdk 等,但没有成功。尝试在 cmd 中打开 gui builder
java -jar C:\Users\user\.codenameone\guibuilder_1.jar
给了我以下
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Connector: file:/C:/Users/user/.guiBuilder/guibuilder.input
java.lang.ArrayIndexOutOfBoundsException
at com.codename1.xml.Element.getChildAt(Element.java:249)
at com.codename1.apps.guibuilder.PropertyType$38.setBodyValue(PropertyType.java:1205)
at com.codename1.apps.guibuilder.GuiPersister.createComponent(GuiPersister.java:111)
at com.codename1.apps.guibuilder.GuiPersister.createComponent(GuiPersister.java:190)
at com.codename1.apps.guibuilder.GuiPersister.load(GuiPersister.java:77)
at com.codename1.apps.guibuilder.GUIBuilder.connected(GUIBuilder.java:67)
at com.codename1.apps.guibuilder.GUIBuilder.start(GUIBuilder.java:98)
at com.codename1.apps.guibuilder.desktop.GUIBuilderMain$9.run(GUIBuilderMain.java:396)
at com.codename1.ui.Display.processSerialCalls(Display.java:1151)
at com.codename1.ui.Display.mainEDTLoop(Display.java:968)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
[EDT] 0:0:0,0 - Codename One revisions: dd0c8959da758abcec7c88230bee90002d3f6ca3
1955
[EDT] 0:0:0,2 - Gui Builder Exception in version 1.09
[EDT] 0:0:0,3 - OS win
[EDT] 0:0:0,3 - Error java.lang.ArrayIndexOutOfBoundsException
java.lang.NullPointerException
at com.codename1.apps.guibuilder.GUIBuilder$1.actionPerformed(GUIBuilder.java:56)
at com.codename1.ui.util.EventDispatcher.fireActionEvent(EventDispatcher.java:349)
at com.codename1.ui.Display.mainEDTLoop(Display.java:977)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
[EDT] 0:0:0,8 - java.lang.NullPointerException
[EDT] 0:0:0,9 - java.lang.NullPointerException
可以在另一台计算机上使用 gui builder 多次打开相同的 gui 表单,没有问题。同样,模拟器也没有问题。我想知道这个问题是由我的系统引起的还是有人遇到同样的问题?
编辑:这是 guibuilder.input 的内容
<?xml version="1.0" encoding="UTF-8"?>
<con name="App" formName="TestUI" file="file:/C:/Users/user/Documents/my-App/res/guibuilder/com/my/App/UI/TestUI.gui" javaFile="file:/C:/Users/user/Documents/my-App/src/com/my/App/UI/TestUI.java" resFile="file:/C:/Users/user/Documents/my-App/src/theme.res" outputFile="file:/C:/Users/user/.guiBuilder/9e0d2b1d-df8d-4878-8418-f09359a7e131.ouput" running="file:/C:/Users/user/.guiBuilder/9e0d2b1d-df8d-4878-8418-f09359a7e131" />