简体   繁体   English

无法为Visual Studio启动Android模拟器

[英]Can't launch an Android Emulator for Visual Studio

Literally tried to fix this with several fixes provided in Microsoft forums and nothing worked and I didn't understand some things. 字面上尝试通过Microsoft论坛中提供的几个修复来解决这个问题,没有任何工作,我不理解一些事情。

I'm trying to launch a test Xamarin Code and make it run on an Android profile but when I try to install it stays at Copying .vhd files and creating a Virtual machine. 我正在尝试启动测试Xamarin代码并使其在Android配置文件上运行,但是当我尝试安装时,它会保留在复制.vhd文件并创建虚拟机。 Here. 这里。

Then it prompts me for admin and it retries. 然后它会提示我输入管理员并重试。 It fails and give me this log file: 它失败并给我这个日志文件:

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)

I read that I should create an Internal Switch and an External switch. 我读到我应该创建一个内部开关和一个外部开关。 I could successfully make an Internal one but when I try to make an External one this happens. 我可以成功制作一个内部的,但当我尝试制作一个外部的时候会发生这种情况。

Using Windows 10 Pro if thats useful for anything, if you need more information I will gladly provide it. 使用Windows 10 Pro,如果这对任何事情都有用,如果您需要更多信息,我很乐意提供它。

I have had this problem before. 我以前遇到过这个问题。 You can always recheck to see if you have developer mode to set to true. 您始终可以重新检查以查看是否将开发人员模式设置为true。 Go to your settings-> Update -> then Developer ensure that the Developer Mode is turned on. 转到您的设置 - >更新 - >然后开发人员确保开启开发者模式。 Then Also you need to make sure your computer is Hyper-V enabled through the BIOS sometimes they are turned off. 然后,您还需要确保计算机通过BIOS启用Hyper-V,有时它们会被关闭。 If you dont have the Hyper-V capability then your pretty much out of luch using emulators. 如果你没有Hyper-V功能,那么你几乎可以使用仿真器。 You would have to the next best thing. 你将不得不做下一个最好的事情。 Install it on a test android phone. 将它安装在测试Android手机上。

this link may be useful 此链接可能有用

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

我之前有这个问题,我需要重新安装Windows

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

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