andoroid studio メモリーエラーが出た時のAVD HAXMメモリー変更


下記のようなエラーが出た時の訂正方法

HAX is not working and emulator runs in emulation mode emulator: The memory needed by this AVD exceeds the max specified in your HAXM configuration.
emulator: AVD RAM size = 1536 MB emulator:
      HAXM max RAM size = 512 MB emulator:

AVDに必要なメモリーが、
HAXMのマックスメモリーを超えているよ!!

HAXMメモリーでは512mbしか使えないのに、
AVDに1536MBも割り振っているので出ているエラー。

AVDマネジャーより詳細設定で、

Memory and storage
RAM ----- MB
VM heap
SD card

のramを、HAXM max RAM sizeのと同じにする。

この場合だと、512mbにする。(多分それ以下でも動く)

あまり割り振りを少なくすると挙動しなくなるようです。

以上。