Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't delete virtual device from Eclipse, android

I have multiple virtual devices, some of them can't be deleted.

Error message is

The android virtual device XXX is currently running in an emulator and cannot be deleted

when I just have restarted Ubuntu and only started Eclipse.

like image 662
whatswrong Avatar asked Nov 02 '11 10:11

whatswrong


People also ask

How do I remove a virtual machine from my Android phone?

From the Virtual tab of the Device Manager, you can perform the following operations on an existing AVD: To edit an AVD, click Edit this AVD and make your changes. To delete an AVD, click Menu and select Delete.

How do I disable a virtual device?

Since the virtualbox monitor does not always offer a shutdown option, you could also log in into the android device and type halt. then type halt at the prompt. This is safer than going to VirtualBox and "hard" shutting down. You can also use adb reboot to reboot the device instead.


2 Answers

In Linux/*nix and OSX:

  1. Find the .android folder in your $HOME directory.
  2. In .android there should be a avd folder
  3. In the avd folder should be one or multiple .ini file and a corresponding *.avd virtual device folder.
  4. Delete both the .ini file and the .avd folder you want to get rid of.
  5. Return to the Android sdk and AVD manager.

I hope this helps...

like image 75
Uttam Avatar answered Oct 10 '22 06:10

Uttam


In the /home/.android/[your device].avd folder sometimes are left behind *.lock files. This can be because of unexpected emulator termination. AVDM doesn't deal with this. Deleting manually a device folder or overriding it solves the problem.

Before trying to delete a virtual device in AVDM. Remove all *.lock files from the corresponding /home/.android/[your device].avd fodlers. You will then be able to delete without the 'device XXX is currently running' popup.

like image 43
jaro Avatar answered Oct 10 '22 06:10

jaro