为什么 Visual Studio Android 的模拟器不再启动?

Why doesn't Visual Studio Emulator for Android launch anymore?

我正在使用 Visual Studio 2015 Enterprise 和新的 Android 模拟器。有段时间还挺好用的,突然就不行了。

VS 中的输出总是这样:

1>Starting emulator: VS Emulator 5.1" Lollipop (5.1.1) XXHDPI Phone
1>Validating emulator arguments...
1>Determining if emulator is already running...
1>Preparing virtual machine...
1>Launching emulator...

模拟器 window 出现,但卡在黑色 "Loading..." 屏幕上。我在任务管理器中看到 xde.exe 消耗了 CPU 的 25% 到 32% 的电量。 Windows 事件日志中没有任何关于 xde 或 Hyper-V 的条目。 我已经按照 Microsoft 在 Troubleshooting the Visual Studio Emulator for Android 页面上的建议删除了 Hyper-V-Manager 中的所有虚拟计算机。

有谁知道如何再次获得模拟器 运行?

试试这个: 1) 转到 Hyper-V 管理器,并通过虚拟交换机管理器删除所有虚拟交换机 2) 在 Hyper-V Manager 中,删除所有 VM。 3) 重新启动计算机。 4) 启动模拟器。

Windows某些计算机的 10 个更新导致虚拟开关出现问题,需要由模拟器从头开始重新创建它们。

如果您遇到同样的问题,那么您可以尝试通过以下步骤解决:

1.删除所有虚拟交换机

按照 John Kemnetz 在 中所说的方式进行尝试:

Go to Hyper-V Manager, and delete all virtual switches via the Virtual Switch Manager 2) In Hyper-V Manager, delete all VMs. 3) Restart the computer. 4) Start an emulator.

2。禁用网络接口

如果这不起作用,请尝试按照 Jason Smith 在评论中描述的方式进行操作:

disable the network interfaces except the windows phone vswitch. Then once the emulator is booted, turn it back on. If you delete them Xde will recreate them, you want them created but disabled in the control panel. The only thing to leave enabled is the windows phone one.

如果这也不起作用(这是我的情况)那么

3。为 Android

重新安装 Visual Studio 2015 模拟器

卸载模拟器,重启电脑,重新安装。这对我有用。但我建议先尝试其他两个选项,因为第三个选项可能非常耗时。