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-V和Windows管理程序平台 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