AMD CPU 面临 Android Studio 模拟器错误 [2021] [英] Facing Android Studio Emulator Error with AMD CPU [2021]

查看:191
本文介绍了AMD CPU 面临 Android Studio 模拟器错误 [2021]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您一如既往地打开 Android Studio,但如果您想运行模拟器设备,则会出现以下错误之一:

You open Android Studio as always, but if you would like to run an emulator device one of the following error appear:

无法为 AMD 安装 Android Emulator Hypervisor 驱动程序处理器

Unable to install Android Emulator Hypervisor Driver for AMD Processors

运行此 AVD 需要英特尔 HAXM.Android 模拟器管理程序未安装 AMD 处理器驱动程序.

Intel HAXM is required to run this AVD. Android Emulator Hypervisor Driver for AMD Processor is not installed.

或稍后在 cmd 或 Powershell 中

or later in cmd or Powershell

[SC] DeleteService 成功.[SC] StartService 错误 4294967201 失败

[SC] DeleteService succeed. Fail of [SC] StartService error 4294967201

推荐答案

简介

首先,我知道那里有一些帖子.但是没有最新的或不完整的.我想指出,我写这篇文章的目的是为这个问题建立一个接近 100% 的工作知识库.作为正确解决该问题的分步教程.

First of all, I know that there are some posts out there. But there not up to date or incomplete. I want to point that my intention with this post is to make a nearly 100% working knowledge base for this issue. Serving as a step by step tutorial for fixing that problem properly.

不要惊慌,我们现在会解决这个问题:)

Don't panic, we will fix that now :)

检查 1:

首先检查您的 BIOS 设置.需要在 BIOS 中启用虚拟化技术.例如 Gigabyte、Asus Rog 或 MSI 称之为 SVM 模式(安全虚拟机"),其他人可能称之为:虚拟化"

Check your BIOS Settings first. Virtualization Technology needs to be enabled in BIOS. Gigabyte, Asus Rog or MSI for example call that SVM Mode ("Secure Virtual Machine") other may call that as mentioned: "Virtualization"

F2/Del 访问BIOS ->高级设置 ->CPU 配置 ->SVM 模式 ->Enable,使用 F10 确保安全(华硕 BIOS 示例)

F2/Del to access BIOS -> Advanced Settings -> CPU Configuration -> SVM Mode -> Enable, safe that with F10 (Asus BIOS Example)

由于供应商的 BIOS 选项不同,请参阅您的系统制造商的手册.

As BIOS options are different among vendors, please refer to your system manufacturer's manual.

检查 2:

输入您的 Windows 搜索栏(左下角)Windows 功能".确保 Hyper-V 和 Windows 管理程序平台已禁用.必须关闭显式或静默启用 Hyper-V 的所有 Windows 功能.之后重新启动计算机.有关您需要取消选中的内容,请参阅下面的屏幕截图:

Type in your Windows searchbar (Lower left corner) "Windows Features". Make sure Hyper-V and Windows Hypervisor Platform are disabled. All Windows features enabling Hyper-V either explicitly or silently must be turned off. Restart your computer after. See the screenshots below for what you need to uncheck:

请注意,在未来的 Studio 4.0 版本中,这些说明将作为 SDK 管理器更新的一部分自动运行并过时.

Note that in a future Studio 4.0 release, these instructions will be automatically run as part of the SDK Manager update and become obsolete.

检查 3:

要真正确保禁用 Hyper-V,请在 Powershell 中运行以下命令.打开 powershell:右键单击您的 Windows 徽标(左下角)->单击 Windows Powershell(管理员) ->继续执行以下命令:

To really ensure that Hyper-V is disabled run following command in Powershell. Open powershell: Right click on your Windows Logo (Lower left corner) -> click Windows Powershell (Administrator) -> proceed with following command:

禁用-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V

Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V

设置安卓工作室

我们现在要为 AMD 处理器安装缺少的管理程序驱动程序:在 Android Studio 中导航 File ->设置 ->expand 外观&行为 ->展开系统设置 ->Android SDK ->SDK 工具 ->安装 Android Emulator Hypervisor Driver for AMD Processors (installer) ->应用 ->好的

We now want to install the missing Hypervisor Driver for AMD Processors: In Android Studio navigate File -> Settings -> expand Appearance & Behavior -> expand System Settings -> Android SDK -> SDK Tools -> install Android Emulator Hypervisor Driver for AMD Processors (installer) -> Apply -> OK

运行安装程序

现在您下载了驱动程序包,您需要找到它的位置.在下图中,您可以看到 Android SDK 的路径.

Now you downloaded the package of the driver you need to find it's location. In the image below you see the path of your Android SDK's.

将该路径复制到您的资源管理器中并如下图所示导航到您的 silent_install.bat

Copy that path into your Explorer and navigate through like in image below to your silent_install.bat

复制资源管理器的完整路径并以管理员身份运行 Powershell(如何打开,如上所述).在 Powershell 中输入:

Copy the complete path of your explorer and run Powershell as Administrator (how to open, explained above). In Powershell type:

cd [这里是你复制的路径]

cd [here your copied path]

然后输入:

.\silent_install.bat

.\silent_install.bat

您可能会收到错误消息,但这并不重要,因为安装程序可以正常工作.我们稍后会看到.服务无法启动只是因为我们上面的 3 项检查 中的一项没有正确完成.然后它看起来像这样:

You will probably get an error, but that isn't important, because the installer worked. We will see it later. The service only couldn't start because one of our 3 CHECKS above are not done properly. Then it will look something like that:

我们使用这个最坏情况"以证明安装程序即使出现以下错误也能成功运行.

We use this "worst case" to proof that the installer operated sucessfully even with the following errors.

[SC] DeleteService 成功.[SC] StartService 错误 4294967201 失败

[SC] DeleteService succeed. Fail of [SC] StartService error 4294967201

他们可能会引导你到一个 github 目录.在那里下载代码,但根本没有必要.它已经奏效了.让我们试试看.

They may lead you to a github directory. To download a code there, but it isn't necessary at all. It worked already. Let's try it out.

PS:如果一切顺利,它看起来会是这样(最好的情况):

PS: If everything went as it should it will look like that (Best case):

创建模拟器设备

让我们创建一个安卓设备并测试它.我按照截图所示一步一步完成了:

Let's create an android device and test it. I made it step by step as shown in the screenshots:

选择设备后,您终于可以下载该设备的安卓版本了:

After you selected a device you are finally able to download the android version of the device:

进行独特的设置:

运行您的设备:

决赛 &结论

现在您可以使用 android studio 模拟器 和 AMD 处理器.恭喜!:)我知道这是一个很长的教程,但你已经完成了.如果您遇到任何问题,请在下面评论,我会尽力帮助您!我这边又是这样.我会不断更新这篇文章.

Now you are able to work with the android studio emulator and an AMD Processor. Congratz! :) I know it was a long tutorial, but you made it trough. If you face any issues, comment below, I try to help you! That was it once again from my side. I keep this post updated.

这篇关于AMD CPU 面临 Android Studio 模拟器错误 [2021]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆