Visual studio (2015) emulator for android does not work - XDE.exe - Exit code 3

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

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

An error occurred while creating the "BC Emulator 5" KitKat (4.4) XXHDPI Phone.

So, I looked through Tools-> Visual Studio Emulator for Android and tried to start the emulator manually. After a while, he fails, and the journal says:

07.24.2015 16:22:52: [Informational] Re-initialization of installed profiles.

07.24.2015 16:22:52: [Informational] Installed profiles are initialized. Devices: 2 Platforms: 1

07.24.2015 16:22:52: [Informational] Re-initialization of installed profiles.

07.24.2015 16:22:52: [Informational] Installed profiles are initialized. Devices: 30 Platforms: 4

07.24.2015 16:22:56: [Informational] Waiting for the device to start ...

07.24.2015 16:22:56: [Informational] Launching the device: 5 "KitKat (4.4) XXHDPI Phone

07.24.2015 16:22:56: [Informational] Checking the arguments of the emulator ...

07.24.2015 16:22:56: [Informational] Determining if the emulator is already running ...

07.24.2015 16:22:56: [Information] Preparing a virtual machine ...

07.24.2015 16:22:58: [Critical] An error occurred while creating the "BC Emulator 5" KitKat (4.4) XXHDPI Phone.

07.24.2015 16:22:58: [Critical] XDE path: C: \ Program Files (x86) \ Microsoft XDE \ 10.0.10240.0 \ xde.exe

07.24.2015 16:22:58: [Critical] XDE Arguments: / sku Android / displayName "VS Emulator 5 \" KitKat (4.4) XXHDPI Phone "/ memSize 2048 / diagonalSize 5 / video" 1080x1920 "/ vhd" C: \ Users \ lacike \ 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. lacike "/ noStart / silent

07.24.2015 16:22:58: [Critical] XDE Exit Code: 3

However, when I run the WinPhone project in a Windows Phone emulator, it works. It uses XDE.exe, for example, Android Emulator, so the Hyper-V network works.

Any ideas?

UPDATE:

When I tried to install a new device profile, I ran into this problem:

Visual Studio 2015 RC Emulator for Android not starting

The process is stuck in "Copying .vhd files and creating a virtual machine."

UPDATE 2:

When I open a command prompt and run xde.exe with the following xde arguments:

xde.exe / sku Android / displayName "VS Emulator 5 \" KitKat (4.4) XXHDPI Phone "/ memSize 2048 / diagonalSize 5 / video" 1080x1920 "/ vhd" C: \ Users \ lacike \ 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.lacike

I get the following error: Service Host Error

+47
android android-emulator visual-studio visual-studio-2015 xamarin
Jul 24 '15 at 14:50
source share
16 answers

After hours and hours of research and applying the following steps, I finally earned it:

1) Restore the Android SDK - go to Programs and Features> Microsoft Visual Studio Emulator for Android> Change and click "Restore"

2) Remove all Hyper-V virtual switches - go to Hyper-V> Virtual switch manager> Delete 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 set up sharing Internet connections on an Ethernet adapter before I had to disconnect it

+68
Jul 29 '15 at 10:39
source share

Typically, a System.ServiceModel.ServiceHost error means that there is some excerpt from a failed installation.

First go to the task manager and kill all running XDE processes. If this does not fix, go to "Programs and Features"> "Microsoft Visual Studio Emulator for Android"> "Change" and click "Restore"

+6
Jul 27 '15 at 17:00
source share

I found the following for me:

  • Disconnect your Wi-Fi connection.
  • Launch the app.
  • Surveillance Emulator loading
  • Turn on wifi.
  • Please note that restarting the application should no longer be a problem as long as the emulator is loaded.
+6
Sep 17 '15 at
source share

Just thought that I would add a solution that solved my problem.

After some digging, I realized that for some reason Hypervisor did not start from my computer. I have a vague feeling that the VirtualBox installation may be responsible for this, but this is not confirmed.

Anyway, for me, the solution was to enable hypervisor loading at boot time using BCDEDIT.

In the admin console, type:

BCDEDIT /Set {current} hypervisorlaunchtype auto 

and restart your computer.

+5
Apr 20 '16 at 7:04 on
source share

I ran into the same problem. However, I managed to start the emulator by doing the following. Go to the xde.exe directory and open a command prompt, then run xde.exe with the xde arguments in your log minus the / nostart / silent commands. So in your case:

xde.exe / sku Android / displayName "VS Emulator 5 \" KitKat (4.4) XXHDPI Phone "/ memSize 2048 / diagonalSize 5 / video" 1080x1920 "/ vhd" C: \ Users \ lacike \ 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.lacike "

It is probably worth opening the task manager first and terminating all running xde.exe processes.

However, I do not have Xamarin, so I cannot confirm that this will allow you to deploy the emulator.

+4
Jul 25 '15 at 15:20
source share

I did this and my problem was fixed.

  • Run cmd.exe with administrator privileges and type

  • bcdedit / set hypervisorlaunchtype auto

  • Reboot the computer.

  • runs as a visual administrator’s studio.

Good luck

+3
Nov 04 '16 at 1:06 on
source share

I had the same problem after installing Android Studio.

Android Studio requires "bcdedit / set hypervisorlaunchtype off"

Visual Studio Emulator for Android requires "bcdedit / set hypervisorlaunchtype auto"

Because of this, I switch to "off" or "auto" and reboot my system.

+2
Sep 05 '16 at 22:03
source share

I think that the main cause of the problem varies from machine to machine, but something seems to be related to how the device drivers of various network interfaces interact with the HyperV system (by the way, I am running Windows 10, some things will be slightly different from Windows 8 )

I have a MiFi device that extracts energy from a USB port for a laptop. The device can provide a direct connection to it via USB using the host system. When it is disconnected from the USB port, it routes traffic through WiFi.

The reasons for Ladislav were a good starting point for me. It took a lot of monkeys - after removing all the emulator and virtual switch images and then restoring the emulator installation for Android, I came across the probable cause of my problem, which is the MiFi unit.

I tried different configurations and noticed that if you disconnect an Ethernet connection created automatically using windows (it has a description of a remote Internet device for remote NDIS), Android and WindowsPhone emulators will now work.

I plan to do more digging, but I noticed that HyperV automatically creates virtual switches for all Bluetooth, Wi-Fi and the main Ethernet port, but not for the MiFi USB connection. Perhaps this creates some confusion in the underlying HyperV system, and resolving it makes everything normal.

Perhaps others can also share their findings?

+1
Mar 11 '16 at 13:49
source share

I had this problem, removing virtual switches in Hyper V was not enough. To resolve this, I needed to turn Hyper V off and then back on.

+1
Oct 07 '16 at 20:56
source share

I ran into the same problem for a week. I followed the steps to fix this, 1) Reset your PC. It will clear all your data and the installation file and restore the OS to an earlier stage. Reset PC 2) Reinstall the visual studio emulator for Android 3) Run any profile, and it works the emulator

Good luck :)

0
May 21 '16 at
source share

After formatting my computer, I ran into the same problem.

The problem was fixed by updating the LAN card drivers, although I do not know why this is so.

0
Jun 03 '16 at 15:00
source share

I ran into the same problem. It has proven itself since I upgraded to Windows 10 (regardless of build).

None of the solutions above seem to work. However, after deactivating all but one of my network interfaces (I have three: Ethernet x 2 and Wifi), the solution proposed by Ladislav Margai above just worked.

This is what I did:

1) Restore the Android SDK - go to Programs and Features> Microsoft Visual Studio Emulator for Android> Change and click "Restore"

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"

3 bis) Deactivate all but one network interface

4) Launch Android emulator for VS with administrator privileges

5) Activate your network interfaces back

0
Aug 2 '16 at 13:02
source share

I solved the problem simply by running VS Android emulator as administrator.

Starting Visual Studio as an administrator also resolved the instant crashes I had every time I started.

0
Aug 25 '16 at 17:57
source share

I had the same problem to solve this problem. I followed the next step as recommended, but nothing, and in the end I just copied the name of the emulator appearing in the error message in the log file, and along the opening path .cfg C: \ Users \ lacike \ AppData \ Local \ Microsoft \ VisualStudioEmulator \ Android \ Containers \ Local \ Devices \ VHD \ 5_KitKat_ (4,4) _XXHDPI_Phone and paste this name in front of device.name

0
Sep 02 '16 at 11:42 on
source share

I had difficult times setting it up, but after a couple of days R&D and having tried the answers with other people, I could do it. Hurrah!!!

1) Problem 1: My version of Visual Studio 2015 Community Edition stopped at the Preparing a Virtual Machine page. Solution: - After analysis, I saw that in my VS → Tools → Android → Android Emulator Manager my AVD (AVD_GalaxyNexus_ToolsForApacheCordova) showed res cross (x). - I fixed it by installing it. This is because my emulator device: VS Emulator 5-inch KitKat (4.4) XXHDPI Phone for API-19. enter image description here

2) Problem 2: he went through the "Preparing a virtual machine" step, but I face many problems with creating a network. Solution: This was resolved in the following situation. The emulator always created a virtual switch using my ethernet when I was connected to Wi-Fi. So, I switched to the LAN cable provided on the Internet and temporarily disconnected my Wi-Fi.

Then it was successful. I needed a few steps mentioned by Ladislav Margai.

I hope this can help others.

0
Sep 23 '16 at 8:29
source share

I tried a bunch of steps here and they didn’t work, so I went through this detailed troubleshooting tool from Microsoft and found the problem.

https://msdn.microsoft.com/library/windows/apps/jj863509(v=vs.105).aspx

In my case, when Hyper-V was installed, Hyper-V Hypervisor (under the Hyper-V platform) was not installed.

I installed it, restarted it, and suddenly the problem was resolved. I can’t believe that I missed this, but maybe someone else has not paid attention to it, and it helps !: D

0
Apr 17 '17 at 16:33
source share



All Articles