安卓工作室。"无法定位ADB "和模拟器屏幕出错 , Flutter

0 人关注

我试图运行我的android studio模拟器,但屏幕上总是弹出 "无法定位adb",之后我的模拟器就崩溃了。我试着删除并制作新的模拟器,但我得到了同样的结果。有谁能帮助我解决这个问题?

strong text 无法找到ADB

我的电脑规格

5 个评论
我也试过了,但我的模拟器上没有任何变化。
你禁用了你的杀毒软件吗?
我已经禁用了我的杀毒软件,但它仍然不工作。 还是我的图形有问题?
@RavindraS.Patil 我也试过了,但在我的模拟器上没有任何变化。
android
flutter
android-studio
android-emulator
adb
Preman Terminal
Preman Terminal
发布于 2021-08-04
2 个回答
Rahana
Rahana
发布于 2021-08-06
已采纳
0 人赞同

Deployment Issues

验证Android SDK是否可以连接到你的模拟器上 .要验证仿真器的连接性,请使用以下步骤。

1.从以下位置启动仿真器 安卓设备管理器 (选择你的虚拟设备并点击开始)。

2.打开一个命令提示符,并转到以下文件夹中 锛屾墍浠嬬粛 安装了。如果Android SDK被安装在其默认位置。 锛屾墍浠嬬粛 位于 C:\Program Files (x86)\Android\android-sdk\platform-tools\锛屾墍浠嬬粛.exe 如果没有,请修改这个路径,以确定你电脑上的Android SDK的位置。

3.在shell中键入以下命令。

adb devices

4.如果模拟器可以从Android SDK中访问,模拟器应该出现在附加设备的列表中。比如说。

List of devices attached
emulator-5554   device

Hardware acceleration issues

5.如果仿真器没有出现在这个列表中,输入以下命令。

"C:\Program Files (x86)\Android\android-sdk\emulator\emulator-check.exe" accel

(你可以验证硬件加速是否启用,以及模拟器使用的是哪种加速方式。无论你是使用Hyper-V还是HAXM进行硬件加速,你都可能遇到配置问题或与电脑上其他软件的冲突)。

该命令假定Android SDK已经安装在默认的位置,即C:\Program Files (x86)\Android\android-sdk如果没有,请修改上述路径,以确定你电脑上的Android SDK的位置。

Hardware acceleration not available

如果Hyper-V是可用的,将从以下例子中返回一个信息,即仿真器-检查.exe加速指挥。

HAXM is not installed, but Windows Hypervisor Platform is available.

如果HAXM是可用的,将返回类似下面例子的信息。

HAXM version 6.2.1 (4) is installed and usable.

Hyper-V issues

在某些情况下,同时启用Hyper-VWindows管理程序平台 in the 打开或关闭Windows功能对话框可能没有正确启用Hyper-V。要验证Hyper-V是否被启用,请使用以下步骤。

6.在Windows搜索框中输入powerhell。

7.Right-click Windows PowerShell in the search results和select Run as administrator.

8.In the PowerShell console, enter the following指挥。

Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online

如果Hyper-V没有启用,将显示与下面的例子类似的信息,表明Hyper-V的状态是禁用的。

FeatureName      : Microsoft-Hyper-V-All
DisplayName      : Hyper-V
Description      : Provides services and management tools for creating and running virtual machines and their resources.
RestartRequired  : Possible
State            : Disabled
CustomProperties :

9.In the PowerShell console, enter the following指挥。

Get-WindowsOptionalFeature -FeatureName HypervisorPlatform -Online

如果没有启用Hypervisor,将显示与下面例子类似的信息,表明HypervisorPlatform的状态是Disabled。

FeatureName      : HypervisorPlatform
DisplayName      : Windows Hypervisor Platform
Description      : Enables virtualization software to run on the Windows hypervisor
RestartRequired  : Possible
State            : Disabled
CustomProperties :

10.如果Hyper-V和/或HypervisorPlatform没有被启用,使用以下PowerShell命令来启用它们。

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform -All