错误信息如下:

[2012-12-23 19:42:34 - HelloWorld] ------------------------------

[2012-12-23 19:42:34 - HelloWorld] Android Launch!

[2012-12-23 19:42:34 - HelloWorld] adb is running normally.

[2012-12-23 19:42:34 - HelloWorld] Performing com.anjoyo.HelloWorldActivity activity launch

[2012-12-23 19:42:34 - HelloWorld] Automatic Target Mode: launching new emulator with compatible AVD 'Android-AVD-2.1'

[2012-12-23 19:42:34 - HelloWorld] Launching a new emulator with Virtual Device 'Android-AVD-2.1'

[2012-12-23 19:42:57 - Emulator] emulator: WARNING: Unable to create sensors port: Unknown error

[2012-12-23 19:42:57 - Emulator] emulator: emulator window was out of view and was recentered

[2012-12-23 19:42:57 - Emulator] 

[2012-12-23 19:42:57 - HelloWorld] New emulator found: emulator-5554

[2012-12-23 19:42:57 - HelloWorld] Waiting for HOME ('android.process.acore') to be launched...

[2012-12-23 19:51:59 - HelloWorld] emulator-5554 disconnected! Cancelling 'com.anjoyo.HelloWorldActivity activity launch'!

 

解决办法:

保持AVD,不要关闭,重新运行工程。

在AVD Manager里面start 虚拟设备,勾选上Wipe user data

3 新建一个名为ANDROID_SDK_HOME的环境变量,值为sdk的目录,如:D:\Program Files (x86)\android-sdk-windows。