mHelpMe
mHelpMe

Reputation: 6668

The selected AVD is currently running in the Emulator

I keep seeing the error message below in andriod studio. I am aware there are already posts that deal with this error. They specify that I go to the location C:\Users\XXXX.android\avd\ and delete the folder Pixel_API_25.avd and Pixel_API_25.ini. However I cannot delete these files as it says they are currently in use. I can't see where though?

The selected AVD is currently running in the Emulator. Please exit the emulator instance and try deleting again.

Upvotes: 5

Views: 18032

Answers (6)

Venkatesh Manchala
Venkatesh Manchala

Reputation: 1

In Windows

To delete the AVD pixel_3a_api_29, you can follow the below steps:

  1. Close the emulator instance if it is running.
  2. Navigate to the location where the AVD is stored. For example, C:\\Users\\xxxxx\\.android\\avd\\Pixel_3a_API_29.
  3. Delete the folder hardware-qemu.ini.lock.
  4. Go to Android Studio -> AVD Manager -> Relaunch emulator.

If you are unable to delete the files due to them being in use, try deleting all .lock files under .android directory ¹.

Still If you are unable to delete the files or folder

This error message usually occurs when the file is being used by another program. Here's what you can try:

  1. Close Android Studio and all running emulators.
  2. Open the Task Manager and end all processes related to adb.exe, emulator.exe, and qemu-system-x86_64.exe.
  3. Navigate to the directory where the AVD is stored. For example, C:\\Users\\xxxxx\\.android\\avd\\Pixel_3a_API_29.
  4. Delete the folder hardware-qemu.ini.lock.
  5. Relaunch Android Studio and the emulator.

If you are still unable to delete the file, try deleting all .lock files under .android directory ¹.

I hope this helps!

Upvotes: 0

ifrit
ifrit

Reputation: 11

For Linux:

  • Go to: YOUR_USERNAME/.android/avd/NAME_OF_EMULATED_DEVICE (to show .hidefiles just press CTRL+H)
  • Delete all files with .lock extension
  • Relaunch emulator in Android Studio

Upvotes: 1

qwertz
qwertz

Reputation: 11

On Windows you can stop the AVD by ending the "qemu-system-x86_64.exe" process in the task-manager. After that you should be able to delete the files.

Upvotes: 1

Kalai
Kalai

Reputation: 51

For Windows

  • Go to FileManager.
  • Go to C://Users/nameOfYourSystem/.android/.avd
  • delete corresponding (selected AVD) configuration setting file.
  • Go to Android Studio -> AVD Manager. Your AVD should not listed here

For MacOS

  • Open YOUR_USERNAME/.android/avd
  • Delete the corresponding configuration setting file.

Upvotes: 5

vaibhav gupta
vaibhav gupta

Reputation: 71

AVD Pixel_3a_API_29 is already running. If that is not the case, delete the files at

  • In my case
  • Go to C:\Users\xxxxx(system name)\.android\avd\Pixel_3a_API_29(emulator name folder)
  • Delete folder hardware-qemu.ini.lock
  • Go to Android Studio -> AVD Manager -> Relaunch emulator

Upvotes: 7

Matt Walterspieler
Matt Walterspieler

Reputation: 2171

Same as @Kalai answer for MacOS

  • In your terminal: open YOUR_USERNAME/.android/avd
  • Delete corresponding configuration setting File.

Upvotes: 1

Related Questions