首先感谢paulluo0739,还有另外一位网络好友Hello_MissID:zhq56030207,在我这篇文章将要引用他们的技术文章中的解决方法。
d:
cd D:/Program Files/android-sdk-windows-1.6_r1/tools
emulator -avd avd1.6
其中 D:/Program Files/android-sdk-windows-1.6_r1/tools是Android SDK目录
emulator -avd avd1.6启动模拟器,'avd1.6'是自己定义的AVD名称
或者编写一个bat文件,直接执行:
@echo off
d:
cd D:/Program Files/android-sdk-windows-1.6_r1/tools
emulator -avd avd1.6
执行完命令或者bat文件后会出现模拟器的界面,然后在eclipse中运行我们编写的android java程序即可,这样没有再出现模拟器断开的情况,程序正常运行!
[2011-04-20 13:20:48 - Mp3Player01] ------------------------------
[2011-04-20 13:20:48 - Mp3Player01] Android Launch!
[2011-04-20 13:20:48 - Mp3Player01] adb is running normally.
[2011-04-20 13:20:48 - Mp3Player01] Performing mars.mp3player.Mp3ListActivity activity launch
[2011-04-20 13:20:48 - Mp3Player01] Automatic Target Mode: launching new emulator with compatible AVD 'av2.3.3'
[2011-04-20 13:20:48 - Mp3Player01] Launching a new emulator with Virtual Device 'av2.3.3'
[2011-04-20 13:21:10 - Mp3Player01] New emulator found: emulator-5554
[2011-04-20 13:21:10 - Mp3Player01] Waiting for HOME ('android.process.acore') to be launched...
[2011-04-20 13:22:26 - Mp3Player01] emulator-5554 disconnected! Cancelling 'XXX.XXX.XXXActivity activity launch'!
这个错误是手动关掉AVD以后出现的,AVD没启动完你就关掉了,当然出现“连接失败”(disconnected!),然后就取消中....