全部博文(626)
分类: Java
2013-09-30 09:35:15
ExecutionException异常
我编写了一个Java ME应用程序,结果在Build时提示如下错误:
Building "MyProject"
C:/Documents and Settings/Administrator/j2mewtk/2.5.2/apps/MyProject/src/MyProject.java:3: MyProject 不是抽象的,并且未覆盖 javax.microedition.midlet.MIDlet 中的抽象方法 destroyApp(boolean)
public class MyProject extends MIDlet{
^
1 错误
com.sun.kvem.ktools.ExecutionException
Build failed
查找原因,原来是:
public void destroyApp(){}
我没有在destroyApp()方法中加入参数,以致于编译器认为程序未继承destroyApp()方法,只需在destroyApp()方法中加入boolean condition参数即可。如下:
public void destroyApp(boolean condition){}
特此记录!