Visual studio (2015) emulator for android not working - XDE.exe - Exit Code 10

10,154

Solution 1

Are you running the emulator in a physical machines? I have similar issues but in nested vms.

Did you check if the hyper-v manager is running properly? Try to open it and start the vms manually and check what is the outcome.

Also, it is really important that you can see the properties in the virtual switch. Most of the problems with hyper-v are due to bad configuration in the virtual switch.

Did you check this answer?

Visual studio (2015) emulator for android not working - XDE.exe - Exit Code 3

Try to do this

1) Repair Android SDK - go to Programs and Features > Microsoft Visual Studio Emulator for Android > Change and hit "Repair"

2) Remove All Hyper-V virtual switches - go to Hyper-V > Virtual switch manager > Remove all virtual switches

3) Run XdeCleanup.exe - In my case: "C:\Program Files (x86)\Microsoft XDE\10.0.10240.0"

4) In my case I had configured Internet connection sharing on Ethernet adapter before so I had to disable it

Check all those things and post more information, I need more details to give you a more complete answer.

Solution 2

I didn't know Android Emulator for Visual Studio worked with Hyper-V. Thanks to @Juan pointing out, I remembered I had switched off Hyper-V some months ago when I installed VMWare. Back in those days I followed this guide and I did run the command:

bcdedit /set hypervisorlaunchtype off

Simply re-enabling it with

bcdedit /set hypervisorlaunchtype auto

and rebooting fixed my problem. I don't know if it's your problem, but that fixed mine that was presenting the same warnings.

Solution 3

I am running Visual Studio within a Parallels virtual machine and got it to work after lowering the amount of RAM that the emulator initially was setup for.

First I made sure Nested virtualization and PMU virtualization was enabled in the Parallels VM settings (click your VM window on your Mac then at the top Mac settings bar go to Actions -> Configure -> Hardware -> CPU & Memory -> Advanced Settings)

Then start up your VM (I am using Windows 8.1) and head to Hyper-V Manager.

Select the Android Emulator you are trying to start (I was trying to start the 7" KitKat (4.4)) then right-click -> Settings -> Memory and I changed the Startup RAM from 1024 to 512 and started it from within the Hyper-V Manager.

Once it starts up fine from within Hyper-V Manger, shut it down and then go back to Visual Studio and try to start the emulator again from there. It looks like the RAM gets reset back to 1024 after starting it the second time from Visual Studio but for some reason it started up fine after that. Maybe it was just a coincidence...

*Edit: ... it didn't work again after that last time so maybe it was a coincidence :(

Share:
10,154

Related videos on Youtube

Jagadeesh Govindaraj
Author by

Jagadeesh Govindaraj

Hi iam full stack developer.working in Augusta hi-tech Coimbatore.My Web Site.

Updated on July 10, 2022

Comments

  • Jagadeesh Govindaraj
    Jagadeesh Govindaraj almost 2 years

    I have created a new App (Xamarin.Forms Portable) project in Visual Studio 2015.

    When I try to run Droid project in Visual Studio Emulator for Android, I just get a generic error message:

    Could not launch 'VS Emulator 5" KitKat (4.4) XXHDPI Phone' device. Exit code 10

    The Logs message is

    06-Aug-15 1:42:39 PM: [Informational] Reinitializing installed profiles.
    06-Aug-15 1:42:39 PM: [Informational] Installed profiles initialized. Devices: 2 Platforms: 1
    06-Aug-15 1:42:42 PM: [Informational] Reinitializing installable profiles.
    06-Aug-15 1:42:42 PM: [Informational] Installable profiles initialized. Devices: 30 Platforms: 4
    06-Aug-15 1:42:46 PM: [Informational] Waiting to launch device...
    06-Aug-15 1:42:46 PM: [Informational] Launching Device: 5" KitKat (4.4) XXHDPI Phone
    06-Aug-15 1:42:46 PM: [Informational] Validating emulator arguments...
    06-Aug-15 1:42:46 PM: [Informational] Determining if emulator is already running...
    06-Aug-15 1:42:46 PM: [Informational] Preparing virtual machine...
    06-Aug-15 1:43:46 PM: [Informational] Launching emulator...
    06-Aug-15 1:44:40 PM: [Critical] Could not launch 'VS Emulator 5" KitKat (4.4) XXHDPI Phone' device. Exit code 10.
    06-Aug-15 1:44:40 PM: [Critical] XDE Path: C:\Program Files (x86)\Microsoft XDE\10.0.10240.0\xde.exe
    06-Aug-15 1:44:40 PM: [Critical] XDE Arguments: /sku Android /displayName "VS Emulator 5\" KitKat (4.4) XXHDPI Phone" /memSize 2048 /diagonalSize 5 /video "1080x1920" /vhd "C:\Users\jagan\AppData\Local\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices\vhd\5_KitKat_(4.4)_XXHDPI_Phone\image.vhd" /name "VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.jagan"
    06-Aug-15 1:44:40 PM: [Critical] XDE Exit Code: 10
    
    • Jesse C. Slicer
      Jesse C. Slicer over 8 years
      I get this on two different laptops. I hope someone has a solution.
    • Jagadeesh Govindaraj
      Jagadeesh Govindaraj over 8 years
      Still i got this error..I am moving to debug over app in physical device ..i updated my configuration on 8 GB RAM ..Still i got this...
  • Juan Acosta
    Juan Acosta over 8 years
    I make it work using a nested hosting that means using vm on my host machine and the nested vm use the hyper v for the emulator. Can you expand how are you running the machines? Are you running in a physical machine?
  • Juan Acosta
    Juan Acosta over 8 years
    Try to disable opengl in the emulator. Check this link and let me know what happen.
  • RelativeGames
    RelativeGames over 8 years
    It didn't work in the first go, had to run VS and emulator twice to work
  • Joe Jordan
    Joe Jordan almost 8 years
    Thanks, I completely forgot that I did this as well. Saved me a lot of time.
  • Rusty Wizard
    Rusty Wizard over 7 years
    I too had the same issue with starting the emulator from within a Parallels Windows 8.1 VM. Enabling Nested virtualization and PMU virtualization worked for me. Thanks @hvaughan3