Android emulator 不能使用的问题
2015-09-15 22:39
597 查看
Possible Solution: Android emulator 不能使用
Bug出现
在Android Studio中初次运行模拟器(Android emulator),使用默认的AVD设置也就是报错,代码确认没有问题(之前一直按照Google的帮助文档做):
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!
从错误信息中可以看出是Intel HAXM没有安装的问题,因为CPU是Intel的,在其上面运行模拟器,而 HAXM又是什么呢?Google一下会得到下面的结果:
The Intel Hardware Accelerated Execution Manager (Intel® HAXM) is a hardware-assisted virtualization engine (hypervisor) that uses Intel Virtualization Technology (Intel® VT) to speed up Android app emulation on a host machine. In combination with Android x86 emulator images provided by Intel and the official Android SDK Manager, HAXM allows for faster Android emulation on Intel VT enabled systems.
其实Windows下也有个类似功能的Microsoft-Hyper-V,只是Android emulator用的是Intel(或amd,与CPU有关)的程序,Windows的Hyper-V反而可能导致Intel的HAXM被屏蔽,这算是另一个bug了。
可能的原因和相应的办法
根本上的原因就是Intel HAXM无法使用(解答从Stack Overflow和How to Enable Intel VT-x in Your Computer’s BIOS or UEFI Firmware上收集)第一种可能:Android的SDK没有安装,可以通过打开对应Android sdk目录下的SDK manager.exe查看:
我的是在Extras的最后一项(带HAXM install),如果右边显示Not installed就说明是相应的包没有安装,还要注意有可能是有包却没有安装,解决办法:
Go to extras > intel > Hardware_Accelerated_Execution_Manager and run the file named “intelhaxm-android.exe”
更多细节在上面两个网站。如果报错“Intel virtualization technology (vt,vt-x) is not enabled“可能是下面两个问题:
第二种可能:You must enable Intel Virtualization Technology. 要进入BIOS或者UEFI中设置Intel Virtualization Technology为 enabled,Stack Overflow的回答很详细就不多说了。
Windows的Microsoft-Hyper-V屏蔽了Intel的HAXM,2和3都会导致intelhaxm-android.exe不能安装。这里看一下How to Enable Intel VT-x in Your Computer’s BIOS or UEFI Firmware的说明就好,倒不用把微软的程序给卸了,只要以管理员身份运行cmd,运行下列操作:
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
相关文章推荐
- 在 Android Emulator 中开发 LKM 程序
- 使用gdb在Android Emulator中进行调试
- andriod-helloworld目录结构
- AVD简单介绍
- eclipse无法启动android模拟器,提示“Failed to allocate memory: 8”
- 【Emulator Snapshot】快照快速启动Android模拟器
- Android——电脑上面玩Android 游戏(.apk文件)
- android4.0创建AVD后,打开虚拟机黑屏问题解决
- Android模拟器无法启动
- Android模拟器无法保存数据
- Android模拟器“尚未注册网络”错误信息的解决办法
- Android模拟器快捷键指南---Android Emulator Keyboard Commands
- 初窥 Android 模拟器 2.0,这些年来最大最棒的更新
- Android 开发工具集合 - (Android Dev Tools)
- Android开发/源码资源汇总
- Android开发工具集合
- 【Android】Android Emulator初探
- 【转帖】安装Intel HAXM为Android 模拟器加速,30秒内启动完成
- 安卓模拟器安装失败解决方法dev kvm is not found
- Android studio DDMS emulator control disable