Visual studio (2015) android 的模拟器不工作 - XDE.exe - 退出代码 10

Visual studio (2015) emulator for android not working - XDE.exe - Exit Code 10

我在 Visual Studio 2015 年创建了一个新的应用程序(Xamarin.Forms 便携式)项目。

当我尝试在 Visual Studio 模拟器中 运行 Droid 项目 Android 时,我只收到一条通用错误消息:

Could not launch 'VS Emulator 5" KitKat (4.4) XXHDPI Phone' device. Exit code 10

日志消息是

06-Aug-15 1:42:39 PM: [Informational] Reinitializing installed profiles.
06-Aug-15 1:42:39 PM: [Informational] Installed profiles initialized. Devices: 2 Platforms: 1
06-Aug-15 1:42:42 PM: [Informational] Reinitializing installable profiles.
06-Aug-15 1:42:42 PM: [Informational] Installable profiles initialized. Devices: 30 Platforms: 4
06-Aug-15 1:42:46 PM: [Informational] Waiting to launch device...
06-Aug-15 1:42:46 PM: [Informational] Launching Device: 5" KitKat (4.4) XXHDPI Phone
06-Aug-15 1:42:46 PM: [Informational] Validating emulator arguments...
06-Aug-15 1:42:46 PM: [Informational] Determining if emulator is already running...
06-Aug-15 1:42:46 PM: [Informational] Preparing virtual machine...
06-Aug-15 1:43:46 PM: [Informational] Launching emulator...
06-Aug-15 1:44:40 PM: [Critical] Could not launch 'VS Emulator 5" KitKat (4.4) XXHDPI Phone' device. Exit code 10.
06-Aug-15 1:44:40 PM: [Critical] XDE Path: C:\Program Files (x86)\Microsoft XDE.0.10240.0\xde.exe
06-Aug-15 1:44:40 PM: [Critical] XDE Arguments: /sku Android /displayName "VS Emulator 5\" KitKat (4.4) XXHDPI Phone" /memSize 2048 /diagonalSize 5 /video "1080x1920" /vhd "C:\Users\jagan\AppData\Local\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices\vhd_KitKat_(4.4)_XXHDPI_Phone\image.vhd" /name "VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.jagan"
06-Aug-15 1:44:40 PM: [Critical] XDE Exit Code: 10

你是运行物理机中的模拟器吗?我有类似的问题,但在嵌套虚拟机中。

您检查过 hyper-v 管理器 运行 是否正确吗?尝试打开它并手动启动虚拟机并查看结果。

此外,您可以看到虚拟交换机中的属性非常重要。 hyper-v 的大部分问题都是由于虚拟交换机中的错误配置造成的。

你检查过这个答案了吗?

尝试这样做

1) Repair Android SDK - go to Programs and Features > Microsoft Visual Studio Emulator for Android > Change and hit "Repair"

2) Remove All Hyper-V virtual switches - go to Hyper-V > Virtual switch manager > Remove all virtual switches

3) Run XdeCleanup.exe - In my case: "C:\Program Files (x86)\Microsoft XDE.0.10240.0"

4) In my case I had configured Internet connection sharing on Ethernet adapter before so I had to disable it

检查所有这些内容和post更多信息,我需要更多详细信息才能为您提供更完整的答案。

我不知道 Android Visual Studio 的模拟器可以与 Hyper-V 一起使用。感谢@Juan 指出,我记得几个月前我在安装 VMWare 时关闭了 Hyper-V。在那些日子里,我遵循 this guide 并执行了 运行 命令:

bcdedit /set hypervisorlaunchtype off

只需重新启用它

bcdedit /set hypervisorlaunchtype auto

并重新启动解决了我的问题。我不知道这是不是你的问题,但那个修复了我的问题,它显示了同样的警告。

我遇到了类似的问题,磁盘空间不足 space。使用 Hyper-V 管理器,我将虚拟机和磁盘移动到我的辅助驱动器。

我在 Parallels 虚拟机中 运行 Visual Studio 并在降低模拟器最初设置的 RAM 量后让它工作。

首先,我确保在 Parallels VM 设置中启用了 嵌套虚拟化PMU 虚拟化(单击您的 VM window在你的 Mac 然后在顶部 Mac 设置栏转到 Actions -> Configure -> 硬件 -> CPU & 内存 -> 高级设置)

然后启动您的虚拟机(我使用的是 Windows 8.1)并前往 Hyper-V 管理器

Select 您尝试启动的 Android 模拟器(我试图启动 7" KitKat (4.4))然后右键单击 -> 设置 -> Memory 并且我将 Startup RAM 从 1024 更改为 512 并从 Hyper-V 中启动它 经理.

一旦它在 Hyper-V Manger 中正常启动,关闭它然后返回 Visual Studio 并尝试从那里再次启动模拟器。看起来 RAM 在从 Visual Studio 第二次启动后被重置回 1024,但出于某种原因,它在那之后启动良好。也许只是巧合...

*编辑:......在上次之后它没有再次工作所以也许这是巧合:(

嗯,对我来说,这个问题是由一个愚蠢的错误引起的。

XDE Exit Code: Unknown (-1073741819)

XDE Exit Code: GenericError (1)

我曾经在我的 CD 驱动器中使用辅助 HDD,并且 Hyper-V 被绑定到驱动器 D。由于某些原因我已经移除了 HDD。

一段时间后,当我尝试创建但只有 C 盘存在时,出现错误。