Android Virtual DeviceでFailed to allocate memory:8 エラーが出たので対処

 

AVDerror_2_sh

Android SDK 21.0 + Android Virtual Deviceで、仮想デバイス起動時に以下のエラーが出たので対処。

Starting emulator for AVD 'GalaxyNexus'
Failed to allocate memory: 8
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

対策は以下3つのどれかで可能

1.AVDのプロファイルを書き換える

C:\Users\<ユーザ名>\.android\avd\<avd-プロファイル名>.avd\config.ini を以下の内容で編集します。

hw.ramSize=1024

hw.ramSize=1024MB

ただし、この場合、仮想デバイスの設定を変更する都度、iniファイルを変更する必要があります。

2.RAMの容量を減らす

AVDerror_1_sh

手元の環境では、仮想デバイスのRAMを1024MB→1000MBとか、1005MBに減らすだけでエラーが出なくなりました。

詳細については参考資料をどうぞ。

手元の環境(Windows 8)ではEclipse を管理者権限で実行してもエラーは出たままでした。

参考資料:Android emulator failed to allocate memory 8 - Stack Overflow

Hatena Pocket Line

コメントを記入