As you said, the problem is not Eclipse losing contact with the Emulator, but ADB - the Android Debug Bridge - losing contact with it. As Eclipse uses ADB to communicate with the emulator when ADB is broken Eclipse can do nothing.
To fix this stop the ADB server by running the following command:
adb kill-server
Eclipse will then usually try to restart ADB, or you can restart it yourself by running an ADB command, such as:
adb devices
If you do, you'll see output like this:
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
emulator-5554 device
You can also do this via the mouse, using the Reset adb option in the Devices view in Eclipse.
It's also worth noting the Console view has two modes, DDMS
and Android
. You're usually in Console
mode but it's DDMS
mode which will show ADB status messages. Select modes by clicking the button with the Monitor icon, or using the arrow next to it:
If all else fails, try killing the adb processes from the OS. On Windows XP I use:
TASKKILL /F /IM adb.exe
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…