简体   繁体   English

HAXM Android虚拟设备未运行

[英]HAXM Android virtual device is not running

I am using 'android studio' for first time . 我是第一次使用“ android studio”。 Trying to run emulator but its take hours , doesn't show android mobile. 尝试运行模拟器,但要花费几个小时,但未显示android mobile。 Only its showing 'Android' in large text. 仅以大字体显示“ Android”。

屏幕截图1

屏幕截图2

屏幕截图3

I read many blog and article , including How to fix: "HAX is not working and emulator runs in emulation mode" 我阅读了许多博客和文章,包括如何解决:“ HAX无法正常工作,并且模拟器在模拟模式下运行”

But still don't have solutions. 但是仍然没有解决方案。

Any help please. 请帮忙。

Thanks 谢谢

The HAXM memory limit has to cover more than the memory assigned to you virtual device. HAXM内存限制所涵盖的范围不能超过分配给您的虚拟设备的内存。

According to the log above, the amount of memory assigned to the device ("AVD RAM size", set to 1536MB) exceeds the memory limit of HAXM ("Max RAM size", currently set to 512MB). 根据上面的日志,分配给设备的内存量(“ AVD RAM大小”,设置为1536MB)超过了HAXM的内存限制(“最大RAM大小”,当前设置为512MB)。 You have to adjust that: by running the HAXM installer, you can set the "Max RAM size" limit to 2048MB (or more should your physical machine be able to handle that) instead of the 512MB currently handled. 您必须进行以下调整:通过运行HAXM安装程序,可以将“最大RAM大小”限制设置为2048MB(如果您的物理计算机可以处理,则可以设置为更大),而不是当前处理的512MB。

-> HAXM installer documentation: for Windows - for MacOS X -> HAXM安装程序文档: 对于 Windows- 对于MacOS X

If your physical machine cannot afford assigning 2048MB or more to HAXM, assign as much as you reasonably can to HAXM (mine is 1024MB), and assign less memory to your virtual device. 如果您的物理机负担不起为HAXM分配2048MB或更多,请合理分配尽可能多的HAXM(最小值为1024MB),并为虚拟设备分配更少的内存。 Be careful though, on my side I couldn't have a API 23 emulator running well with less than 768MB assigned (and 64MB for the heap). 不过要小心,在我这边,我不能让分配少于768MB(堆为64MB)的API 23仿真器运行良好。

-> To change the memory settings of your virtual device, you have to go to the "Android Virtual Device (AVD) Manager", and then to edit your device. ->要更改虚拟设备的内存设置,必须转到“ Android虚拟设备(AVD)管理器”,然后编辑设备。 I highlighted this in the picture below. 我在下面的图片中强调了这一点。

在此处输入图片说明

I'm using Eclipse, but the process should be similar under Android Studio. 我正在使用Eclipse,但是在Android Studio下,该过程应该类似。

If you wish to work with Android Studio built in AVD then consider installing Intel x86 Emulator Accelerator (HAXM). 如果您希望使用内置在AVD中的Android Studio,请考虑安装Intel x86 Emulator Accelerator(HAXM)。 To find it, open Tools>Android>SDK Manager, then scroll down on the screen to Extras. 要找到它,请打开“工具”>“ Android”>“ SDK管理器”,然后在屏幕上向下滚动到“其他”。 You will see it as a last option. 您将看到它作为最后的选择。 This would speed up things for better. 这样可以使事情变得更好。 在此处输入图片说明 Much better solution will be to use genymotion. 更好的解决方案是使用genymotion。 You can install it for free and it's way faster. 您可以免费安装它,而且速度更快。 https://www.genymotion.com/#!/developers/user-guide https://www.genymotion.com/#!/developers/user-guide

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM