8

I've installed the RTM build of VS2015 with the Android Tools. I can launch the emulator manager and see the list of installed images. When I click the green triangle to start an image, it shows a progress bar and the text "Launching emulator..." and XDE opens up with the message "OS is starting"

After a while, XDE shows an error message:

[Window Title] Visual Studio Emulator for Android

[Content] The emulator is unable to connect to the device operating system:

Couldn't set up the UDP port.

Some functionality might be disabled.

[Close]

Strangely, when I look in Hyper-V Manager, the image seems to be running perfectly.

I have already removed the GuestDisplayNameProvider line from xdesku.xml, which was previously resulting in the error: "Failed to read from dev/hw_random: No such device" on startup.

Derek Lakin
  • 16,179
  • 36
  • 51

4 Answers4

10

So I finally fixed this issue, it's because I had broken virtual ethernet adapters. Here's what I did to fix it.

  • Remove Hyper-V through by turning off the windows feature.
  • Reboot
  • Open device manager and go to network adapters.
  • Remove all of the Hyper-V Virtual Ethernet Adapters
  • Enable Hyper-V through by turning the windows feature back on.
  • Reboot
  • Try to run your emulator, you should notice that the Virtual Ethernet Adapters are recreated and working.
Renari
  • 822
  • 7
  • 16
  • 32
3

This occurred after disabling then re-enabling Hyper-V. To fix the problem:

Delete all virtual switches in Hyper-V Manager, delete all virtual machines in Hyper-V Manager, uninstall all profiles in Visual Studio Emulator for Android. Then reboot the machine (just to be sure). Then, open Visual Studio Emulator for Android, download the profile you want, and then click "play". The relevant switches, VMs, etc will all get created fresh now.

Derek Lakin
  • 16,179
  • 36
  • 51
  • Just tried this... Have the same error with Hyper-V Android emulators, but with the fully released VS2015 now on Win10, after disabling and re-enabling Hyper-V. Under Actions tab on right in Hyper-V Manager, clicked "Virtual Switch Manager...", deleted all virtual switches, OK. In VS Emulator for Android deleted all device profiles. Rebooted. Same problem after re-creating a device. I also see the "Failed to read from dev/hw_random: No such device" error if I connect to a console while the device boots. Is there anything else I could try? Thanks! – gregko Oct 17 '15 at 13:04
  • after deleting all virtual switches and restarted, it prompted me about configuring networks. If I selected "No", it would fail with the error. If I selected "Yes", it would re-create everything and worked fine. – MPavlak Jan 16 '17 at 19:19
1

Go to "C:\Program Files (x86)\Microsoft XDE\10.0.10586.0\SKUs\Android\" and open xdesku.xml with notepad and remove the following line: GuestDisplayProvider="VsEmulator.OpenGLGuestDisplay.

If your emulator freezes on "OS is starting" but Hyper-V shows "OS" , follow the following link:

https://stackoverflow.com/a/32006888/948236

It works for me.

Ashraf
  • 2,612
  • 1
  • 20
  • 35
Ali Yousefi
  • 2,355
  • 2
  • 32
  • 47
0

Add new virtual switch helped me a lot.

screenshot

glennsl
  • 28,186
  • 12
  • 57
  • 75