Android出错The application has stopped unexpectedly
刚开始学Android,编了一个简单的程序,代码如下就出现上面的错误了.是什么原因啊publicclassHelloextendsActivity{/**Calledwh...
刚开始学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);
}
} 展开
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);
}
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询