38

When I launch the emulator I face many problems (Errors):-

HttpConnectionApp]emulator-5554 disconnected!
Cancelling 'net.paxcel.http.HttpConnectionApp activity launch'!

Emulator]emulator: ERROR: the user data image is used by another emulator.
aborting            

Each time I have to re-run it but all in vain.

How can I improve this so that I can re-run the application on same AVD?

13 Answers 13

51

I had the same issue after my computer locked up and I had to power cycle it.

Wiping the user data didn't fix my problem, I had to delete the following folders manually

C:\Users\%UserName%\.android\avd\AVD2.1.avd\cache.img.lock
C:\Users\%UserName%\.android\avd\AVD2.1.avd\userdata-qemu.img.lock
3
  • 1
    I have just come across a similar problem. I had to also shut down my emulator as it kicks off a new one. But your solution works. +1
    – angryITguy
    Feb 16, 2011 at 4:02
  • 1
    Whenever you launch the emulator it creates a lock, you cannot launch it twice. In my case the computer crashed and was giving me the same message "ERROR: the user data image is used by another emulator"
    – Travis
    Mar 5, 2011 at 21:48
  • 1
    Works for me. For Mac users, the path is /Users/username/.android/avd/avd_version#/cache.img and userdata-qemu.img. It will start a new emulator so you can close the older one
    – oky_sabeni
    Jun 20, 2011 at 15:22
24

A quick-fix that obviously works is to restart the adb server each time this error occurs:

adb kill-server && adb start-server

Then, you simply run the application again (without restarting AVD) and that's it.

1
  • 1
    +1 for not making me restart the emulator. I think we all know the Honeycomb emulator isn't a speedy little guy.
    – mattr-
    Apr 15, 2011 at 4:45
8

Run configurationsTargetWipe user data → Run.

It fixed the problem in my case.

4

Here is the answer that helped me: link text

Another solution for me is start the avd manager and start once emulator from there. After that everything turns to normal.

0
2

AFAIK, this happens when an emulator is started, but the Android Debug Bridge couldn't establish connection to it.

If you have just started the emulator with your application, watch if you get Waiting for HOME to launch... or something similar in your Console.

If you don't get that message, but the emulator has been started, chances are, you'll get into the ERROR: the user data image is used by another emulator situation again.

1

emulator: ERROR: the user data image is used by another emulator. aborting

Tried restarting the computer as I had done a lot of messing around earlier but no joy same error.

Went to shut down ADB so as I'm on XP I run > cmd then paste in > cd C:\Program Files\Android\android-sdk\platform-tools (the location of the location for the ADB on XP)

Tried

adb kill-server && adb start-server

Then moved the directories cache.img.lock and userdata-qemu.img.lock in the C:\Documents and Settings\.android\avd\ to a New folder (instead of deleting)

This worked fine.

1

Delete the existing emulators and then make a new one.

This worked for me, when I had this problem and couldn't find the folders to delete.

1

Under Run Configurations --> Target --> Add Command Line Options add this

adb kill-server && adb start-server

every time running your App will kill-restart the adb server.

0

It's probably a bad install of ADT. Try uninstalling the plugin, restarting Eclipse, then installing it again fresh.

That of you aren't letting the emulator boot all the way up and are closing it before ADT/ADB can install/run your app.

2
  • no it did'nt work .Apart from ADT i installed fresh copies of all required s/w .But nothing work . Nov 18, 2009 at 8:01
  • Well, I hate to sound condescending, but people have had this problem before... are you sure the virtual machine is completely booted? Nov 18, 2009 at 16:59
0
  1. Please set wipe_data for emulator
  2. Use same instance of application (after modification if any) to avoid error you are getting.
0

This can also happen if you're using a network share as your home folder, because some network file sharing systems may lock the image files.

0

Delete the directories cache.img.lock and userdata-qemu.img.lock (in my case these files are in /mylocalusername/.android/avd/avd7.avd

0

Thanks for this! Just to add for some people who develop in Windows XP.

The path to the avd directory can be C:\Documents and Settings\.android\avd

Thanks again for the answer! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.