This has been driving me bonkers the last couple of days so I just wanted to jot down the steps to get the Emulator up and running under Windows 10. In my case after upgrading from Win 8.1. So if you ever received one of the following errors:
- [Critical] An internal virtual network switch is required for emulated devices to run.
- [Critical] XDE Exit Code: CouldntCreateInternalSwitch (16)
- [Critical] XDE Exit Code: CouldntStartVm (10)
- [Critical] XDE Exit Code: InvalidArguments (3)
- For UDP connection errors see update of July 2016 at the end.
These steps should help you bring the Emulator back up and running:
Disclaimer: Please note that you perform these steps at your own risk. Generally speaking all should run just fine but some steps will remove some Hyper-V settings and this might affect your network connectivity or virtual machine setup. So take these steps as worked on my machine advice.
- Ensure no XDE.exe task is running (Task Manager)
- Repair Android SDK – Open Programs and Features > Microsoft Visual Studio Emulator for Android > select Change in the menu bar and choose Repair in the Visual Studio dialog
- Remove All Hyper-V virtual switches – open the Hyper-V Manager > select the Virtual Switch Manager… (located in the menu on the right) > select each virtual switch and select remove > click onto Apply
- If there is an error while removing a virtual switch, try restarting your computer
- Run XdeCleanup.exe – Depends on your install but on the Surface Pro 3 you should find it under: "C:\Program Files (x86)\Microsoft XDE\10.0.10240.0"
Now try to get your Emulator up and running. If you still receive error messages try the following steps:
- (Surface Pro 3) Reinstall the network drivers > Open the Device Manager> under View select Show hidden devices > Uninstall Marvell AVASTAR Wireless-AC Network Controller and Surface Ethernet Adapter > Restart which will automatically reinstall the drivers from the recovery partition
- Clean up network bridges > Open Network Connections > Add Bridge (this option only showed up the first time) > Remove the added bridge again
Now your Emulator should fire up.
I had to repeat step 3 a couple of times – even after the emulator would start up the first time but maybe that is just a configuration issue on my machine…
Hope this helps and happy coding!
Update - 20. July 2016
- Open Device Manager (On Win10 simply search for Device Manager in the Start Menu)
- Under Viewselect Show hidden devices
- Delete all virtual network devices except your Network card (you do not have remove the Bluetooth devices)
- Open Hyper-V and remove all Hyper-V virtual network endpoints as described under Point 3