mac下进行android编程不可避免会碰到android虚拟机问题,macbook pro启动虚机时报错:
Starting emulator for AVD 'NEW' 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!
原因是HAXM(使用了VT技术)没正确安装和加载。mac下先要允许加载未签名驱动(详情请点击),命令如下:
sudo nvram boot-args="kext-dev-mode=1"
然后是HAXM的安装,android SDK只是下载了,需要手工到的extra下去安装(详情请单击),执行命令:
./HAXM installation
最后只想说一句:加速后的虚机好快,颠覆我以前对虚机的看法。