Android Studio のエミュレーターが動かない
windows10
18:30 Emulator: emulator: ERROR: x86_64 emulation currently requires hardware acceleration!
18:30 Emulator: CPU acceleration status: Unable to open HAXM device: ERROR_FILE_NOT_FOUND
18:30 Emulator: Process finished with exit code 1
2,3日前は動いていたけど、windows update とか Android Studio のupdate とか bios の更新とか、いろいろした気がする。
bios で acceralerator が動いていることは確認。
HAXM がインストールされているか以下で確認。
PS C:\Users\***\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager>.\silent_install.bat
Intel HAXM updated successfully!
問題なさそう。
対応
accel check
https://developer.android.com/studio/run/emulator-acceleration
windows でも同様にできる。
c:\Users\***\AppData\Local\Android\Sdk\tools>emulator.exe -accel-check
accel:
15
Please disable Hyper-V before using the Android Emulator. Start a command prompt as Administrator, run 'bcdedit /set hypervisorlaunchtype off', reboot.
Hyper-が邪魔らしい。設定した記憶はないんだけど。
c:\Users\***\AppData\Local\Android\Sdk\tools>bcdedit /set hypervisorlaunchtype off
再起動すると、あれ、docker for windows が警告画面をだした(SS忘れてた)。
visualization で Hyper-V が必要らしい。こいつが元凶か。
エミュレータは無事起動。