emulator-5554 disconnected! Cancelling 'com.china.hello.HelloChina activity launch'!
首先,控制台提示连接模拟器失败,没有启动你的HelloChina其次,
public void onCreate(Bundle saveInstanceState) { super.onCreate(saveInstanceState); //setContentView(R.layout.main); // 这个不能注释掉,这个是你要加载的layout TextView tv = new TextView(this); tv.setText("helloWorld"); setContentView(tv); // 这样用是不对的,textview不是一个layout,必须用layout才行,所以前面的setContentView不能注释掉楼主可以先把默认生成的layout显示出来,然后再一步步修改成你想要的,那样至少保证版本是正确的。 }
首先,控制台提示连接模拟器失败,没有启动你的HelloChina其次,
public void onCreate(Bundle saveInstanceState) { super.onCreate(saveInstanceState); //setContentView(R.layout.main); // 这个不能注释掉,这个是你要加载的layout TextView tv = new TextView(this); tv.setText("helloWorld"); setContentView(tv); // 这样用是不对的,textview不是一个layout,必须用layout才行,所以前面的setContentView不能注释掉楼主可以先把默认生成的layout显示出来,然后再一步步修改成你想要的,那样至少保证版本是正确的。 }
请慎重回帖。可以直接使用TextView。
1.1 英文原版
window -> Show Views -> device -> view menu -> Reset adb
1.2 中文版
窗口(W) -> 显示视图(V) ->Devices -> 视图菜单 ->Reset adb
[2010-12-01 12:39:04 - HelloChina] ------------------------------
[2010-12-01 12:39:04 - HelloChina] Android Launch!
[2010-12-01 12:39:04 - HelloChina] adb is running normally.
[2010-12-01 12:39:04 - HelloChina] Performing com.china.hello.HelloChina activity launch
[2010-12-01 12:39:04 - HelloChina] Automatic Target Mode: launching new emulator with compatible AVD '2.2'
[2010-12-01 12:39:04 - HelloChina] Launching a new emulator with Virtual Device '2.2'
[2010-12-01 12:39:16 - HelloChina] New emulator found: emulator-5554
[2010-12-01 12:39:16 - HelloChina] Waiting for HOME ('android.process.acore') to be launched...
话说,我这08年买的HP本开模拟器也要老久老久....有可能的话去买个真机吧,真机调试边USB就ok了