Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you get the VS Android Emulator Images to launch?

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.

like image 635
Derek Lakin Avatar asked Jul 22 '15 18:07

Derek Lakin


People also ask

How do I enable Android emulator in Visual Studio?

Just open up the Visual Studio Emulator for Android entry in your Start Menu, hit play, and the emulator is ready to debug from any IDE. Download the standalone emulator today!

How do I launch VS code emulator?

Step 1: Go to the Extensions button on VSCode and search for Android and iOS Emulator and install it. Note: Change the Emulator path windows address based on the location of the emulator file on your PC but make the Emulator path as default it would be given as default by the VSCode.

How do I access files on Android emulator?

From the main menu, go to View -> Tool Windows -> Device File Explorer. You can then select your device / emulator from the drop down list. To access /data/user/0/com. example.


1 Answers

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.
like image 95
Renari Avatar answered Sep 23 '22 04:09

Renari