无法为Visual Studio启动Android模拟器

时间:2016-09-10 20:46:12

标签: c# android visual-studio xamarin android-emulator

字面上尝试使用Microsoft论坛中提供的几个修复程序解决这个问题,但没有任何工作,我不理解某些事情。

我正在尝试启动测试Xamarin代码并使其在Android配置文件上运行,但是当我尝试安装时,它会保留在复制.vhd文件并创建虚拟机。 Here.

然后它会提示我输入管理员并重试。它失败并给我这个日志文件:

0> 9/9/2016 10:11:43 PM : [Informational] ===== Session Started =====
1> 9/9/2016 10:11:43 PM : [Informational] Emulator manager version: 1.1.622.2
1> 9/9/2016 10:11:43 PM : [Informational] Emulator manager plugin version: 1.1.622.2
1> 9/9/2016 10:11:43 PM : [Informational] Microsoft Windows NT 10.0.14393.0 Windows 10 Pro
1> 9/9/2016 10:11:43 PM : [Informational] Virtualization type: UnknownOrNotVirtual
1> 9/9/2016 10:11:43 PM : [Informational] Virtualization Version: alaska - 1072009
1> 9/9/2016 10:11:43 PM : [Informational] Virtualization Serial Number: to be filled by o.e.m.
1> 9/9/2016 10:11:43 PM : [Informational] Virtualization Product: z97 killer
1> 9/9/2016 10:11:43 PM : [Informational] Display Adapter 0: Name: NVIDIA GeForce GTX 970, Version: 21.21.13.7270
2> 9/9/2016 10:11:43 PM : [Informational] Reinitializing installed profiles.
2> 9/9/2016 10:11:43 PM : [Informational] Installed profiles initialized. Devices: 1 Platforms: 2
2> 9/9/2016 10:11:43 PM : [Informational] Reinitializing installable profiles.
2> 9/9/2016 10:11:45 PM : [Informational] Installable profiles initialized. Devices: 38 Platforms: 5
3> 9/9/2016 10:12:06 PM : [Informational] Waiting to uninstall device...
3> 9/9/2016 10:12:06 PM : [Informational] Uninstalling Device: 10.1" Marshmallow (6.0.0) XHDPI Tablet
3> 9/9/2016 10:12:06 PM : [Informational] Uninstalling virtual machine for 10.1" Marshmallow (6.0.0) XHDPI Tablet
3> 9/9/2016 10:12:06 PM : [Informational] Removing device files
3> 9/9/2016 10:12:06 PM : [Informational] Uninstall complete
2> 9/9/2016 10:12:06 PM : [Informational] Reinitializing installed profiles.
2> 9/9/2016 10:12:06 PM : [Informational] Installed profiles initialized. Devices: 0 Platforms: 2
4> 9/9/2016 10:12:08 PM : [Informational] Waiting to install device...
4> 9/9/2016 10:12:08 PM : [Informational] Installing Device: 5.7" Marshmallow (6.0.0) XHDPI Phone , Version: 1.0.60404.1
4> 9/9/2016 10:12:09 PM : [Informational] Creating device configuration
2> 9/9/2016 10:12:09 PM : [Informational] Reinitializing installed profiles.
2> 9/9/2016 10:12:09 PM : [Informational] Installed profiles initialized. Devices: 1 Platforms: 2
4> 9/9/2016 10:12:10 PM : [Informational] Copying .vhd files and creating virtual machine
4> 9/9/2016 10:14:12 PM : [Informational] Waiting to uninstall device...
4> 9/9/2016 10:14:12 PM : [Informational] Uninstalling Device: 5.7" Marshmallow (6.0.0) XHDPI Phone
4> 9/9/2016 10:14:12 PM : [Informational] Uninstalling virtual machine for 5.7" Marshmallow (6.0.0) XHDPI Phone
4> 9/9/2016 10:14:13 PM : [Informational] Removing device files
4> 9/9/2016 10:14:13 PM : [Informational] Uninstall complete
2> 9/9/2016 10:14:13 PM : [Informational] Reinitializing installed profiles.
2> 9/9/2016 10:14:13 PM : [Informational] Installed profiles initialized. Devices: 0 Platforms: 2
4> 9/9/2016 10:14:14 PM : [Informational] Waiting to install device...
4> 9/9/2016 10:14:14 PM : [Informational] Installing Device: 5.7" Marshmallow (6.0.0) XHDPI Phone , Version: 1.0.60404.1
4> 9/9/2016 10:14:14 PM : [Informational] Creating device configuration
2> 9/9/2016 10:14:14 PM : [Informational] Reinitializing installed profiles.
2> 9/9/2016 10:14:14 PM : [Informational] Installed profiles initialized. Devices: 1 Platforms: 2
4> 9/9/2016 10:14:15 PM : [Informational] Copying .vhd files and creating virtual machine
4> 9/9/2016 10:15:27 PM : [Critical] An internal virtual network switch is required for emulated devices to run.
4> 9/9/2016 10:15:27 PM : [Critical] XDE Path: C:\Program Files (x86)\Microsoft XDE\10.0.10586.0\xde.exe
4> 9/9/2016 10:15:27 PM : [Critical] XDE Arguments: /sku Android /displayName "VS Emulator 5.7\" Marshmallow (6.0.0) XHDPI Phone" /memSize 3072 /diagonalSize 5.7 /video "1440x2560" /vhd "C:\Users\lbthe\AppData\Local\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices\vhd\5.7_Marshmallow_(6.0.0)_XHDPI_Phone\image.vhd" /name "VS Emulator 5.7-inch Marshmallow (6.0.0) XHDPI Phone.lbthe" /noStart /silent
4> 9/9/2016 10:15:27 PM : [Critical] XDE Exit Code: CouldntCreateInternalSwitch (16)

我读到我应该创建一个内部开关和一个外部开关。我可以成功制作一个内部的但是当我尝试制作一个外部的this时。

如果对任何内容有用,请使用Windows 10 Pro,如果您需要更多信息,我很乐意提供。

2 个答案:

答案 0 :(得分:0)

我以前遇到过这个问题。您始终可以重新检查以查看是否将开发人员模式设置为true。转到您的设置 - >更新 - >然后开发人员确保开启开发者模式。然后,您还需要确保计算机通过BIOS启用Hyper-V,有时它们会被关闭。如果你没有Hyper-V功能,那么你几乎可以使用仿真器。你将不得不做下一个最好的事情。将它安装在测试Android手机上。

此链接可能有用

https://blogs.msdn.microsoft.com/visualstudioalm/2015/07/20/using-the-visual-studio-emulator-for-android-from-android-studio-or-eclipse-with-adt/

答案 1 :(得分:0)

之前我遇到过这个问题,我需要重新安装Windows