android studioでemulatorが起動できない
android studioでemulatorを起動するときに以下のエラーが起こって起動できないことがある。
毎回調べるのも時間がかかりすぎるのでメモ。
まず、ログに出力されるエラー内容は以下のとおり。
emulator: The memory needed by this AVD exceeds the max specified in your HAXM configuration.
HAXM is not working and emulator runs in emulation mode
emulator: AVD RAM size = 1536 MB
emulator: HAXM max RAM size = 1024 MB
emulator: You might want to adjust your AVD RAM size and/or HAXM configuration to run in fast virt mode.
emulator: emulator window was out of view and was recentered.
自分なりに日本語に訳すと、
「メモリ1536MBで設定してるけど、最大で1024MBしか使えないから、設定しなおして。」て感じ。
で、この設定は下のような画面ハードコピーどおりにやれば、再度ビルドしたときに無事起動させることができるはず。このへんの設定に一番はじめめちゃくちゃ手間取ったので、どなたかの参考になれば。
emulatorの管理画面で鉛筆マークをクリック
詳細設定画面へ遷移するボタン押下
下にスクロールしてこの画面のところを変更して完了