10
3

More than 1 year has passed since last update.

[Android]AVDManager操作時に"The selected AVD is currently running in the Emulator."と言われた時の対処法

Posted at

概要

Android開発をしていて、エミュレータのデータやエミュレータ自体を消去したいときなどにAVDマネージャーを操作しようとすると以下のようなエラーが出ることがある。
image.png

PCを再起動したりするとうまくいくが、再起動せずとも解決できる方法があるので紹介する。

方法

.lockと名のつくファイルを全て消す

コマンド

rm ~/.android/avd/your_emulator/*.lock

your_emulatorに入れるemulatorの名前はlsで確認できる

ls ~/.android/avd/


上記の実行結果が以下だった場合

Pixel_5_API_32.avd	Pixel_5_API_32.ini

削除コマンド

rm ~/.android/avd/Pixel_5_API_32.avd/*.lock

実行後、もう一度wipe dataを試みると、以下のように消せるようになる
image.png

参考

10
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
3