问题描述
我想使用 Visual Studio Emulator for Android ,但是每当我尝试启动它时,它都会失败.
I want to use Visual Studio Emulator for Android but whenever I try to start it it fails.
日志的最后一部分是:
27.9.2015. 11:10:38: [Informational] ===== Session Started =====
27.9.2015. 11:10:38: [Informational] Microsoft Windows NT 6.3.9600.0 Windows 8.1 Pro with Media Center
27.9.2015. 11:10:38: [Informational] Virtualization type: UnknownOrNotVirtual
27.9.2015. 11:10:38: [Informational] Virtualization Version: alaska - 1072009
27.9.2015. 11:10:38: [Informational] Virtualization Serial Number: to be filled by o.e.m.
27.9.2015. 11:10:38: [Informational] Virtualization Product: z97-d3h-cf
27.9.2015. 11:10:38: [Informational] Display Adapter 0: Name: NVIDIA GeForce GTX 960, Version: 10.18.13.5362
27.9.2015. 11:10:38: [Informational] Display Adapter 1: Name: Intel(R) HD Graphics 4600, Version: 10.18.14.4170
27.9.2015. 11:10:39: [Informational] Reinitializing installed profiles.
27.9.2015. 11:10:39: [Informational] Installed profiles initialized. Devices: 3 Platforms: 2
27.9.2015. 11:10:39: [Informational] Reinitializing installable profiles.
27.9.2015. 11:10:39: [Informational] Installable profiles initialized. Devices: 30 Platforms: 4
27.9.2015. 11:10:41: [Informational] Waiting to launch device...
27.9.2015. 11:10:41: [Informational] Launching Device: 10.1" Lollipop (5.1.1) XHDPI Tablet
27.9.2015. 11:10:41: [Informational] Validating emulator arguments...
27.9.2015. 11:10:41: [Informational] Determining if emulator is already running...
27.9.2015. 11:10:41: [Informational] Preparing virtual machine...
27.9.2015. 11:10:47: [Critical] An internal virtual network switch is required for emulated devices to run.
27.9.2015. 11:10:47: [Critical] XDE Path: C:\Program Files (x86)\Microsoft XDE\10.0.10240.0\xde.exe
27.9.2015. 11:10:47: [Critical] XDE Arguments: /sku Android /displayName "VS Emulator 10.1\" Lollipop (5.1.1) XHDPI Tablet" /memSize 2048 /diagonalSize 10.1 /video "2560x1600" /vhd "C:\Users\Miro\AppData\Local\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices\vhd\10.1_Lollipop_(5.1.1)_XHDPI_Tablet\image.vhd" /name "VS Emulator 10.1-inch Lollipop (5.1.1) XHDPI Tablet.miro" /noStart /silent
27.9.2015. 11:10:47: [Critical] XDE Exit Code: CouldntCreateInternalSwitch (16)
到目前为止,我已经尝试过...
- 从如何完成所有步骤为Windows Phone 8的仿真器启用Hyper-V
- VMX 和 EPT 已启用-使用 coreinfo.exe 检查
- SLAT 已启用-已通过 CheckSLATStatusOfMachine.exe 检查
- 已禁用 Intel VT-d
- 已启用 Windows功能 中的 Hyper-V
- Done all steps from How to enable Hyper-V for the emulator for Windows Phone 8
- VMX and EPT are enabled - checked with coreinfo.exe
- SLAT is enabled - checked with CheckSLATStatusOfMachine.exe
- Disabled Intel VT-d
- Enabled Hyper-V in Windows features
系统信息
- CPU:英特尔i7-4790K
- 操作系统:带有Media Center的Windows 8.1 Pro
- Hyper-V管理器:v6.3.9600.16384
- CPU: Intel i7-4790K
- OS: Windows 8.1 Pro with Media Center
- Hyper-V Manager: v6.3.9600.16384
- 我手动添加了专用和内部交换机网络(如果命名很重要,则分别命名为"Windows Phone Emulator专用交换机"和"Windows Phone Emulator内部交换机").之后重新启动,再试一次.没用.
- 我注意到 XdeCleanup.exe 会删除手动创建的内部专用交换机.
- I manually added private and internal switch networks (named "Windows Phone Emulator Private Switch" and "Windows Phone Emulator Internal Switch", if naming matters). Restarted afterwards, tried again. Didn't work.
- I've noticed that XdeCleanup.exe deletes manually created internal private switch.
- 打开设备管理器,并从网络适配器 中删除一个并且只有一个 Intel(R)以太网连接I217-V
- 那我根本找不到网络适配器,它消失了,所以我无法重新安装网络驱动程序
- 重新启动计算机后,不仅在网络适配器中自动安装了 Intel(R)以太网连接I217-V ,而且还自动安装了 Microsoft Hyper-V网络交换机已安装默认的微型端口.我第一次看到的东西.
- 然后,我尝试了与Edit#2中相同的控制台项.控制台没有像编辑#2"中那样启动.相反,我得到了这个.好吧,至少没有错误!
- 因此我陷入了VS2015的困境,从模板创建了Cordova应用并尝试运行模拟器.当我为所有请求的用户授予特权后,它就成功启动了!
- 然后我在网络适配器下看到了两个正在自动创建的新条目.
- Opened Device Manager and deleted one and only Intel(R) Ethernet Connection I217-V from Network adapters
- Then I couldn't find Network adapters at all, it disappeared so I couldn't reinstall network driver
- After I had rebooted machine not only Intel(R) Ethernet Connection I217-V was installed automatically in Network adapters but also Microsoft Hyper-V Network Switch Default Miniport was installed. Something that I saw for the first time.
- Then I tried the same console entry as in Edit #2. The console didn't started as in Edit #2. Instead I got this.Well at least there was no error!
- So I ran strait to VS2015, created Cordova app from template and tried to run emulator. After I gave all the requested user privileges it successfully started!
- Then I saw under Network adapters two new entries that were created automatically in process.
- 打开Hyper-V管理器,通过虚拟交换机管理器删除所有虚拟交换机,删除所有VM,然后重新启动.现在,尝试重新启动模拟器.
- 如果仍然失败,请尝试升级用于将您连接到互联网的适配器的驱动程序(我猜这是WiFi适配器吗?).转到控制面板>设备管理器,然后在网络适配器"下找到您的WiFi/互联网适配器,右键单击并卸载.完成后,右键单击网络适配器"并扫描硬件更改.这将重新安装您的适配器.重新启动,然后尝试再次启动模拟器.
- 如果仍然失败,最后的操作是在Windows上运行修复".如果Hyper-V与您的网络适配器之间确实存在问题,则可以解决该问题
System info
我花了很多时间找出解决方案,但失败了.我想念什么?
I've spent a lot of time to figure out the solution and I've failed. What am I missing?
我看到对于Windows手机,有时他们会在 Hyper-V Manager 中设置自己的虚拟开关.那是我也应该做的事情,并且应该怎么做?
I saw that for Windows phone sometimes they set their own virtual switch in Hyper-V Manager. Is that something I should also do, and how should it be done?
与此同时:
编辑#2
我已经厌倦了@John Kemnetz建议的方法.模拟器环境开始了.
Edit #2
I've tired method suggested by @John Kemnetz.The emulator environment starts.
选择是后,将显示此异常.
After selecting Yes this exception is shown.
我来了@John Kemnetz在以后的答案中建议的第二次尝试.这些都是步骤:
I've came to the second attempt suggested by @John Kemnetz in later answer.These are all the steps:
推荐答案
看起来像Hyper-V的问题.您可能要尝试以下操作(按顺序):*
Looks like a problem with Hyper-V. You may want to try the following (in order):*
*请注意,#2是适用于kr85的解决方案
*note that #2 was the solution that worked for kr85
这篇关于适用于Android的Visual Studio模拟器-运行模拟设备需要内部虚拟网络开关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!