安卓工作室模拟器无法启动,并显示与内存限制相关的错误消息

2022-09-02 09:02:46

我正在尝试运行我的第一个Android工作室项目,但我收到此错误消息,模拟器无法启动:

Created filesystem with 11/4224 inodes and 1302/16896 blocks
Failed to create Context 0x3005
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
emulator: WARNING: Requested RAM size of 1536MB is too large for your environment, and is reduced to 1152MB.
emulator: device fd:544
HAX is not working and emulator runs in emulation mode
emulator: The memory needed by this VM exceeds the driver limit.
Cannot set up guest memory 'pc.ram': Invalid argument

答案 1

答案 2

安卓工作室安装后

在 CMD(管理员运行身份)中,执行以下命令(应关闭模拟器):

//if it's installed on D:, at first, "cd" to that drive, like  "D:"
cd "%ANDROID_SDK_HOME%\sdk\extras\intel\Hardware_Accelerated_Execution_Manager"
silent_install.bat -m 1024

这会将 HAXM 内存设置为 1024Mb(最大 1800)。在 VDM 中设置 RAM 参数略低于此值,如 980

如果您使用的是Mac OS,则使用导航到路径并执行/<USER_DIR>/Library/Android/sdk/extras/intel/Hardware_Accelerated_Execution_Managersudo ./silent_install.sh -m 1024


推荐