简体   繁体   English

AMD CPU 面临 Android Studio 仿真器错误 [2021]

[英]Facing Android Studio Emulator Error with AMD CPU [2021]

You open Android Studio as always, but if you would like to run an emulator device one of the following error appear:您像往常一样打开Android Studio ,但如果您想运行仿真器设备,则会出现以下错误之一:

Unable to install Android Emulator Hypervisor Driver for AMD Processors无法为 AMD 处理器安装 Android 仿真器管理程序驱动程序

or或者

Intel HAXM is required to run this AVD.运行此 AVD 需要 Intel HAXM。 Android Emulator Hypervisor Driver for AMD Processor is not installed.未安装用于 AMD 处理器的 Android 仿真器管理程序驱动程序。

or later in cmd or Powershell或更高版本的cmdPowershell

[SC] DeleteService succeed. [SC] DeleteService 成功。 Fail of [SC] StartService error 4294967201 [SC] StartService 失败错误 4294967201

INTRODUCTION介绍

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.我想指出,我写这篇文章的目的是为这个问题建立一个几乎 100% 的工作知识库。 Serving as a step by step tutorial for fixing that problem properly.作为正确解决该问题的分步教程。

Don't panic, we will fix that now:)不要惊慌,我们现在会解决这个问题:)

CHECK-1:检查-1:

Check your BIOS Settings first.首先检查您的 BIOS 设置。 Virtualization Technology needs to be enabled in BIOS.需要在 BIOS 中启用虚拟化技术。 Gigabyte, Asus Rog or MSI for example call that SVM Mode ("Secure Virtual Machine") other may call that as mentioned: "Virtualization"例如,技嘉、华硕 Rog 或 MSI 称之为 SVM 模式(“安全虚拟机”),其他人可能会称之为:“虚拟化”

F2 / Del to access BIOS -> Advanced Settings -> CPU Configuration -> SVM Mode -> Enable , safe that with F10 (Asus BIOS Example) F2 / Del访问BIOS -> Advanced Settings -> CPU Configuration -> SVM Mode -> Enable ,使用F10确保安全(华硕 BIOS 示例)

BIOS 启用 SVM 模式

As BIOS options are different among vendors, please refer to your system manufacturer's manual.由于供应商之间的 BIOS 选项不同,请参阅您的系统制造商的手册。

CHECK-2:检查-2:

Type in your Windows searchbar (Lower left corner) " Windows Features ".输入您的 Windows 搜索栏(左下角)“ Windows Features ”。 Make sure Hyper-V and Windows Hypervisor Platform are disabled.确保 Hyper-V 和 Windows Hypervisor Platform 已禁用。 All Windows features enabling Hyper-V either explicitly or silently must be turned off.所有启用 Hyper-V 的 Windows 功能都必须显式或静默关闭。 Restart your computer after.之后重新启动计算机。 See the screenshots below for what you need to uncheck:请参阅下面的屏幕截图,了解您需要取消选中的内容:

取消选中箭头标记的字段

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

CHECK-3:检查-3:

To really ensure that Hyper-V is disabled run following command in Powershell .要真正确保禁用 Hyper-V,请在Powershell中运行以下命令。 Open powershell: Right click on your Windows Logo (Lower left corner) -> click Windows Powershell (Administrator) -> proceed with following command: Open powershell: Right click on your Windows Logo (Lower left corner) -> click Windows Powershell (Administrator) -> proceed with following command:

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

SETUP ANDROID STUDIO设置 ANDROID 工作室

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 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

适用于 AMD 处理器的 Android Emulator Hypervisor 驱动程序(安装程序)

RUN THE INSTALLER运行安装程序

Now you downloaded the package of the driver you need to find it's location.现在您下载了驱动程序的 package,您需要找到它的位置。 In the image below you see the path of your Android SDK's.在下图中,您可以看到 Android SDK 的路径。

Android SDK 位置

Copy that path into your Explorer and navigate through like in image below to your silent_install.bat将该路径复制到您的资源管理器中并如下图所示导航到您的silent_install.bat

导航到您的silent_install.bat

Copy the complete path of your explorer and run Powershell as Administrator (how to open, explained above).复制您的资源管理器的完整路径并以管理员身份运行Powershell (如何打开,如上所述)。 In Powershell type:Powershell类型中:

cd [here your copied path] cd [这里是您复制的路径]

Afterwards execute your installer by typing:然后通过键入以下命令执行您的安装程序:

.\silent_install.bat .\silent_install.bat

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.该服务无法启动,因为我们上面的3项检查之一没有正确完成。 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 succeed. [SC] DeleteService 成功。 Fail of [SC] StartService error 4294967201 [SC] StartService 失败错误 4294967201

启动服务错误 4294967201

They may lead you to a github directory.他们可能会将您带到 github 目录。 To download a code there, but it isn't necessary at all.在那里下载代码,但根本没有必要。 It worked already.它已经奏效了。 Let's try it out.让我们试试看。

PS: If everything went as it should it will look like that (Best case): PS:如果一切顺利,它会看起来像这样(最好的情况):

最好的情况,一切看起来都是正确的,但它不需要

CREATING EMULATOR DEVICE创建模拟器设备

Let's create an android device and test it.让我们创建一个 android 设备并对其进行测试。 I made it step by step as shown in the screenshots:如屏幕截图所示,我一步一步完成了它:

窗口 1 和 2

After you selected a device you are finally able to download the android version of the device:选择设备后,您终于可以下载该设备的 android 版本:

窗口 3

Make your unique settings:进行独特的设置:

窗口 4

Run your device:运行您的设备:

窗口 5

FINAL & CONCLUSION最后与结论

Now you are able to work with the android studio emulator and an AMD Processor.现在您可以使用android studio emulator和 AMD 处理器。 Congratz: ,) I know it was a long tutorial. Congratz:,)我知道这是一个很长的教程。 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.我不断更新这篇文章。

有效!芜湖:)

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

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