Android: Working with Eclipse’s quirks

January 21st, 2014

The Problem

One of the most annoying quirks for Eclipse when working with Android emulators (Android Virtual Devices – AVDs) is that sometimes once you’ve launched an AVD (which can take several minutes), it can lose connection with the emulator. This means that when you try to launch your app on the running emulator, it cannot find the app, and will not output any logs to Eclipse. Sometimes restarting Eclipse or the AVD helps, sometimes it doesn’t.

The Solution

To fix this, we can restart the Android Debugging Bridge (adb), which connects with the AVD, even whilst the AVD is running.

In the console, type:

adb kill-server
This will kill the adb server.

Then restart it:

adb start-server

Then try running your app again – it should find it then connect in Eclipse, and give you the logcat / console output.

Tags: , , ,

This entry was posted on Tuesday, January 21st, 2014 at 17:32 and is filed under Blog, Mobile, Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Switch to desktop version