当前位置:编程学习 > wap >>

JAVAME程序 打包后安装到手机,提示:错误:无法安装XXX,因为应用软件文件(.jad)缺少关键信息。Details:null,机型为 Asha 501模拟

jad清单文件:

MIDlet-Jar-Size: 1849
MIDlet-Jar-URL: MyFirstMldlet.jar
MIDlet-Name: MyFirstMldlet MIDlet Suite
MIDlet-Vendor: MIDlet Suite Vendor
MIDlet-Version: 1.0.0
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-2.1

伪代码1
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;

public class HelloWorldMIDlet
 extends MIDlet {

 public HelloWorldMIDlet() {
 }

 // Sets the MIDlet's current Display to a HelloScreen object.
 public void startApp() {
 Displayable current = Display.getDisplay(this).getCurrent();
 if (current == null) {
 HelloScreen helloScreen = new HelloScreen(this, "Hello, world!");
 Display.getDisplay(this).setCurrent(helloScreen);
 }
 }

 public void pauseApp() {
 }

 public void destroyApp(boolean unconditional) {
 }
}



伪代码2

import javax.microedition.lcdui.*;

class HelloScreen
 extends Form
 implements CommandListener {

 private final HelloWorldMIDlet midlet;
 private final Command exitCommand; // Exit command for closing the MIDlet in the device UI.

 public HelloScreen(HelloWorldMIDlet midlet, String string) {
 super("");
 StringItem helloText = new StringItem("", string);
 super.append(helloText);
 this.midlet = midlet;
 exitCommand = new Command("Exit", Command.EXIT, 1);
 addCommand(exitCommand);
 setCommandListener(this);
 }

 public void commandAction(Command command, Displayable displayable) {
 if (command == exitCommand) {
 midlet.notifyDestroyed();
 }
 }
}



用的Nokia Asha SDK 1.0 with Nokia IDE 2.0 for Java ME 工具包,Asha 501 机型。。

我搞不懂了
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,