android开发分享解决android报错:Intel HAXM is required to run this AVD

今天,简单讲解android 启动模拟器时,提示错误:intel haxm is required to run this avd. vt-x is disabled in bios. enable

今天,简单讲解android 启动模拟器时,提示错误:

intel haxm is required to run this avd. vt-x is disabled in bios. enable vt-x in your bios security settings (refer to documentation for your computer)的问题。

这个问题其实是android studio是否下载了download intel x86 emulator accelerator (haxm installer),所以检查sdk manager是否下载download intel x86 emulator accelerator (haxm installer),如果下载了,那么可能是电脑没有开启虚拟化技术,去bios开启intel虚拟化。

具体步骤如下:

1.首先在sdk manager中检查是否安装download intel x86 emulator accelerator (haxm installer),如果没有安装,则在sdk manager中下载安装download intel x86 emulator accelerator (haxm installer)。

2.到sdk目录下(一般是c:usersadministratorappdatalocalandroidsdk),在这个目录下沿着 extras > intel > hardware_accelerated_execution_manager 目录找到intelhaxm-android.exe这个文件安装定并运行。

3.在安装的过程中,你可能会遇到这样的错误提示:”intel virtualization technology (vt,vt-x) is not enabled”,不用担心,这时你只需要进入bios界面在“configurations”中找到“intel virtualization technology”将其设置成enable即可(关于进入bios界面的方式不同的电脑大同小异,我的笔记本是联想笔记本,所以我在开机显示联想logo的一瞬间按下f2即进入了bios界面)。

android 解决错误:intel haxm is required to run this avd就讲完了。

就这么简单。

补充知识:解决amd cpu 启动android模拟器时无法安装intel haxm 的问题

刚买的电脑,是用的amd的cpu,在安装android开发环境时,遇到以下问题:

  failed to install intel haxm. for details, please check the installation log: "c:userszhangqsappdatalocaltemphaxm_log9.txt"  haxm installation failed. to install haxm follow the instructions found at: https://software.intel.com/android/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-windows  installer log is located at c:userszhangqsappdatalocaltemphaxm_log9.txt  installer log contents:  === logging started: 2020/1/4 13:34:14 ===  this computer does not support intel virtualization technology (vt-x) or it is being exclusively used by hyper-v. haxm cannot be installed.   please ensure hyper-v is disabled in windows features, or refer to the intel haxm documentation for more information.     === logging stopped: 2020/1/4 13:34:14 ===  done

网上搜了很多办法,试过下面几种,都不行。

1.关闭hyper-v。

2.禁用hyper-v相关的服务。

3.单独下载intel haxm安装。

试了很多次,都失败了。

我的电脑配置是:

解决android报错:Intel HAXM is required to run this AVD

在网上一搜,说是android studio已经支持amd cpu的,后面在android sdk配置项中终于发现有这么一项。

(根据下面图中2处红色标记就可以找到android对应的amd模拟器驱动)

解决android报错:Intel HAXM is required to run this AVD

简单的来说,就是以下步骤:

1.开机进入bios,设置cpu开启虚拟化。是否开启,可以通过任务管理器确定。

解决android报错:Intel HAXM is required to run this AVD

2.关闭win10的hyper-v和windows hypervisor platform 和 windows sandbox。

(如果不知道是该勾选,还是不勾选,跟下面截图的选中状态一致即可。)

解决android报错:Intel HAXM is required to run this AVD

对应中文版的系统是:

解决android报错:Intel HAXM is required to run this AVD

3.打开命令行,进到:

$android_sdk_rootextrasgoogleandroid_emulator_hypervisor_driver.

($android_sdk_root 是android sdk的安装路径,如果不是安装在默认路径,需要你手动改一下)

运行:silent_install.bat,如果执行结果返回是:state: 4 running,说明安装成功。

至此,就可以使用android针对amd处理器的高性能模拟器了。

以上这篇解决android报错:intel haxm is required to run this avd就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持<计算机技术网(www.ctvol.com)!!>。

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/addevelopment/891480.html

(0)
上一篇 2021年10月19日
下一篇 2021年10月19日

精彩推荐