Android出错The application has stopped unexpectedly
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/09/21 13:45:00
Android出错The application has stopped unexpectedly
刚开始学Android,编了一个简单的程序,代码如下就出现上面的错误了.是什么原因啊
public class Hello extends Activity {
/** Called when the activity is first created.*/
private Button myButton = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
myButton = (Button)findViewById(R.id.myButton);
myButton.setText(R.string.welcome);
}
}
刚开始学Android,编了一个简单的程序,代码如下就出现上面的错误了.是什么原因啊
public class Hello extends Activity {
/** Called when the activity is first created.*/
private Button myButton = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
myButton = (Button)findViewById(R.id.myButton);
myButton.setText(R.string.welcome);
}
}
没有错的啊,我刚也给你编译过了,你看下是不是main.XML文件中你的Button的id写错了.如果不行自己看下logcat是那出错了,不行就把logcat给我贴出来,我帮你看.
Android出错The application has stopped unexpectedly
Android:the application has stopped unexpectedly
android启动时出现The application has stopped unexpectedly.
Android程序运行the application has stopped unexpectedly. please
Android为什么每次运行时都出现这种The application has stoped unexpectedly.
android开发出现The application has stoped unexpectedly.Logcat内容见
学习android,run as 之后出现The application *** has stopped unexpec
he has died.the rain has stopped.
The clock has stopped ;The clock Was stopped
android application project下怎么没有 android application project
The rain has stopped,but the heart still drop
the bus__on the road for an hour.a.has stopped b.stopped c.i