【发布时间】:2013-12-20 11:54:48
【问题描述】:
我目前正在为 Asha 手机制作应用程序,包括 3xx 系列和新的 5xx 系列。
我已经有在 3xx 系列如 Asha 310 和 311 上工作的代码,但由于某种原因,当我在 Asha 501 手机上编译和试用时,它不起作用..
我收到了“点击了收音机 1 !!!”在 Asha 310 的模拟器控制台上显示消息,但在 Asha 501 上没有。
我正在为 Asha 310/311 使用诺基亚 Java SDK 2.0,为 Asha 501 手机使用诺基亚 Asha SDK 1.1,以及 SDK 中包含的适当的 Asha LWUIT 库。
有谁知道为什么它可以在旧 Asha 手机上运行,而在新手机上却不行?
Form form = new Form("Testing form");
RadioButton choices[] = new RadioButton[2];
RadioButton radioButton1 = new RadioButton("Radio 1");
RadioButton radioButton2 = new RadioButton("Radio 2");
choices[0] = radioButton1;
choices[1] = radioButton2;
PopupChoiceGroup popupChoiceGroup = new PopupChoiceGroup("Testing", choices);
radioButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
System.out.println("Radio 1 clicked!!!");
}
});
radioButton2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
System.out.println("Radio 2 clicked!!!");
}
});
form.addComponent(popupChoiceGroup);
form.show();
编辑:我正在使用手机模拟器,所以我可以看到输出。
【问题讨论】:
-
你不能这样测试。电话没有可见的控制台。 System.out.println 永远不会显示在任何 JavaME 手机上。要正确测试,您应该在表单中创建一个文本字段,然后将文本放入其中。
-
我正在使用手机模拟器。正如我所提到的,我在 310 模拟器的控制台上得到了文本,但在 501 模拟器的控制台上没有。在你问之前,是的,我在 501 模拟器上收到了其他文本,只是不是这个..
-
Asha SDK 组件非常非常bug(
标签: java-me actionlistener lwuit nokia-s40