Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Emulator frequently disconnected (offline)!

Sometime just after I launched a new emulator, for very first time I was trying to upload my apk, however I got "emulator: ERROR: the user data image is used by another emulator. aborting".

I launched a new emulator, and left it alone, several minutes later, DDMS showed "device offline".

I had to restart a new one, you know, minutes wasted.
It's really bothering that I keep getting this error and slowed down debugging.
How do I fix it?

like image 345
fifth Avatar asked May 16 '11 05:05

fifth


1 Answers

If the emulator is still alive, you can tell adb to connect to it via tcp (which is I believe what it does anyway, only it normally uses an 'emulator' class of name and would now get a ip:port one)

It's been a while since I've had to do that, but I think that if you were using emulator-5554 you would connect to your development machine's loopback one port higher, ie:

adb connect localhost:5555

If it works adb devices will show it an eclipse should see it as a deployment option

The 'in use' problem sounds like a stale lockfile perhaps left behind in a crash

like image 153
Chris Stratton Avatar answered Nov 17 '22 07:11

Chris Stratton