I create a blank cordova application in visual studio 2015 and start debugging with the visual studio android emulators (first with the lollipop and then kitkat). XDE starts
I also had this issue and it was not just for android emulators but for all windows phone emulators.
This is what i did to fix the issue
Run the XdeCleanup.exe (just in case)
Also, I disabled the firewall from my virus guard
After this I was able to run the emulator from "Visual Studio Emulators for Android"
After alot of searching I got this working. Hope this helps. I found it in the comments on MSDN Article for Android Emulator with Visual Studio 2015
The new images might work if you disable OpenGL by going to Program Files (or Program Files x86 if you're on a 64-bit machine) \ Microsoft XDE \ 10.0.0.0 \ SKUs \ Android \ xdesku.xml and deleting this line: GuestDisplayProvider = "VsEmulator.OpenGLGuestDisplay". However, without OpenGL turned on you will not be able to take advantage of many of the new features
I was running into the same issue. I did try to disable OpenGL by deleting: GuestDisplayProvider = "VsEmulator.OpenGLGuestDisplay" in xdesku.xml, as suggested in other answers.
At first, the virtual machine would boot up (you could connect to it from Hyper-V manager), but the emulator window itself would not connect to the machine (stuck on "OS is starting", then failing after a looooong while with the following message: "The emulator is unable to connect to the device operating system: Couldn't auto-detect the guest system IP address. Some functionality might be disabled.")
This answer https://stackoverflow.com/a/31698124/1010492 and that one https://stackoverflow.com/a/14402740/1010492 helped me solve the connectivity issue, and I was able to have the Virtual Machine displayed inside the emulator window.
However, the emulator wasn't working properly (scaling issues, no Home, Back, etc. buttons) until I put back the line "VsEmulator.OpenGLGuestDisplay" and after removing my profiles and rebooting a number of times.
To sum up, if you are encountering the same issue on an Hyper-V enabled computer, you may want to try the --over conscious-- following steps:
- Ideally, uninstall any other Virtualisation software such as VMWare, Virtual Box and VPN clients such as Cisco VPN (if you cannot do that, please be vigilant at step 13)
- Reboot
- In the "Visual Studio Emulator for Android" dialog, delete all installed device profiles
- Remove All Hyper-V virtual switches - go to Hyper-V > Virtual switch manager > Remove all virtual switches
- Run XdeCleanup.exe (usually in "C:\Program Files (x86)\Microsoft XDE\10.0.10240.0")
- Also remove any extra virtual network adapters left in "Control Panel > Network and Internet > Network Connections" (after following the previous steps, you should normally be left with only physical adapters)
- Make sure Network Sharing is disabled on all network adapters (right click, Properties, Sharing, untick "Allow other network users to connect through this computer's Internet connection")
- If ever you deleted the line
GuestDisplayProvider="VsEmulator.OpenGLGuestDisplay"
in xdesku.xml (usually in "C:\Program Files (x86)\Microsoft XDE\10.0.10240.0\SKUs\Android"), NOW IS A GOOD TIME TO PUT IN BACK.- Reboot
- You may want to try to repair the emulators: go to Programs and Features > Microsoft Visual Studio Emulator for Android > Change and hit "Repair" (although I have to say this always fails for me)
- Reboot
- Open the Visual Studio Emulator for Android, and install then run one of the profiles (eg: 7'' KitKat (4.4) XHDPI Tablet -- Similar to Asus Google Nexus 7)
- It may already work, but if not you should make sure that your network adapters are setup properly. Stop your emulator, then Go to Control Panel > Network and Internet > Network Connections, and right click the vEthernet adapters, then Properties and make sure you only have the following boxes ticked in the Networking list (as explained in Interference from other virtualization or networking software and drivers: Client for Microsoft Networks, QoS Packet Scheduler, File and Printer Sharing for Microsoft Networks, Microsoft LLDP Protocol Driver, Link-Layer Topology Discovery Mapper I/O Driver, Link-Layer Topology Discovery Responder, Internet Protocol Version 6 (TCP/IPv6), Internet Protocol Version 4 (TCP/IPv4)
- Reboot
- Try to start the emulator again in "Visual Studio Emulator for Android"
- If it still doesn't work, try to delete and recreate the profiles, and loads of reboots...
There are probably some redundants steps here, but I think it covers everything you should try (the key seems to be making sure that the network adapters are setup properly). If I've missing some things or if you think some steps are useless, please comment.
One of the reason I was having this issue is that I did not install the Android SDK on the default location. So I had to follow these instructions in order to be able to debug my application: https://msdn.microsoft.com/en-us/library/mt228282.aspx#ADB
I had to create the folder "Android SDK Tools" and add the Key "Path" with the value to my SDK, which in my case it was "E:\Android\Android_SDK"
I went through the steps in @Gyum Fox answer and still no joy for me.
While the Visual Studio Emulator for Android creates the first emulator instance, several virtual network switches are also created. For a laptop, typically three vEthernet instances are created; one for the wired LAN, one for the Wi-Fi, and another internal virtual switch for guest to host connections.
In my case, the vEthernet for the wired LAN was created successfully and then the Visual Studio Emulator for Android process would hang. This is observable from the Hyper-V Manager and the Virtual Switch Manager action.
Using the Virtual Switch Manager I successfully created the missing Wi-Fi virtual switch with these steps. Well, ultimately it worked. Read on.
In my case though, after clicking Apply, a failure message indicated the Wi-Fi adapter was bridged. Hmmm.
I started the View Network Connections control panel applet and the Wi-Fi adapter did not show it was bridged. (When a network bridge exists, the Status column has the word Bridged appended.) I suspect there was some dusty digital bits lurking somewhere in the registry.
Here is what cleared the issue for me.
Now, go back up to the steps to create the virtual switch for the Wi-Fi network. The steps should complete successfully now.
And now, you can go back to creating the Android emulators you want.
One final thought… If you aren’t seeing any virtual switches being created, I suspect that could mean the wired LAN might have the dusty digital bits hanging you up. In that case, I’d try add-and-remove-from-bridge trick on the wired LAN adapter to see if that clear things up for you.
And, now I suppose that just doing the add-and-remove-from-bridge trick on the network adapter without creating the virtual switch might suffice. For me, the creation of the virtual switch was proof that the issue was corrected. YMMV ;-)
On my system I got it working again after enabling the disabled vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch) again. I didn't have to reboot.