Why doesn't Visual Studio Emulator for Android launch anymore? - visual-studio

I'm using Visual Studio 2015 Enterprise with the new Android Emulator. It worked pretty well for a while but suddenly it stopped working.
The output in VS shows always this:
1>Starting emulator: VS Emulator 5.1" Lollipop (5.1.1) XXHDPI Phone
1>Validating emulator arguments...
1>Determining if emulator is already running...
1>Preparing virtual machine...
1>Launching emulator...
The emulator window appears but it stucks on the black "Loading..." screen. I see in the taskmanager that xde.exe is consuming between 25% and 32% of CPU power. There are no entries in the Windows eventlog telling anything about xde or Hyper-V.
I've already deleted all virtual computers in the Hyper-V-Manager as suggested by Microsoft on the Troubleshooting the Visual Studio Emulator for Android page.
Has anyone an idea how to get the emulator running again?

If you face the same problem then you can try to solve it by these steps:
1. Delete all virtual switches
Try it the way John Kemnetz told in his answer:
Go to Hyper-V Manager, and delete all virtual switches via the Virtual
Switch Manager 2) In Hyper-V Manager, delete all VMs. 3) Restart the
computer. 4) Start an emulator.
2. Disable network interfaces
If this doesn't work then try to do it the way Jason Smith described in a comment:
disable the network interfaces except the windows phone vswitch. Then
once the emulator is booted, turn it back on. If you delete them Xde
will recreate them, you want them created but disabled in the control
panel. The only thing to leave enabled is the windows phone one.
In case this doesn't work neither (which was my case) then
3. Reinstall Visual Studio 2015 Emulator for Android
Uninstall the emulator, reboot the PC and install it again. This worked for me. But I suggest to try the other two options first as the third option can be really time consuming.

Try this:
Go to Hyper-V Manager, and delete all virtual switches via the Virtual Switch Manager
In Hyper-V Manager, delete all VMs.
Restart the computer.
Start an emulator.
Windows 10 updates for some computers are causing problems with virtual switches and they need to be recreated by the emulator from scratch.

Related

Xamarin, Windows 10 Parallels and connecting to a MAC based Android Emulator

I am trying to get my Parallels Visual Studio install to talk to the Android Studio Emulators on my MAC (for whatever reason I am struggling to start the windows ones such as Android Player / Microsoft Android Emulator as they ask for Hyper-V or whatever etc).
Also, having it connect to my MAC reduces the need to install emulators on every VM instance.
I have followed the steps in this guide -
https://taco.visualstudio.com/en-us/docs/run-android-emulator-on-osx-using-parallels/
And after I run the putty SSH script to connect to the MAC, I sadly cannot see any emulators using
adb devices
But, if I run from windows command prompt after the script has connected -
adb connect localhost:5555
I then see via
adb devices
List of devices attached
emulator-5554 offline
So it is "sort of" connecting, but the device is registering as offline and I cannot seem to do anything to get it online so that it could finally show up in the Xamarin Visual Studio Device list.
Does anyone have experience of this who could help out? Is this doable for Xamarin Visual Studio?
NOTES
I have tried kill-server / start-server on both machines to no avail to remove the offline
Thank you WickedW, I'm glad it helped!
So the solution is:
I had the same problem and I found that if Xamarin studio is running on Mac, it will block ports 5554 and 5555. Close it, run in Parallels Windows adb kill-server (Visual Studio will restart it) and restart the SSH connection.
Thanks to "bitibi" on -
https://forums.xamarin.com/discussion/comment/249573#Comment_249573
I always had Xamarin Studio open during a working day when trying to fix this, and it was basically blocking the ports, soon as turned off Xamarin Studio and re-tried the process, all started working!!

Cannot start windows phone 10 emulator

I am not able to start any of the Mobile Emulators for Windows Phone 10 (version 10.0.10240).
When I start it from the VS 2015, it gets stuck at "OS is starting". In the Hyper-V Manager, I can see the status "Starting (10%)" for the whole time. After some time, the machine is automatically restarted and it gets stuck at "Starting (10%)" again. Then it timeouts again and the emulator shows an error: "The virtual machine cannot be started because the file rdvgm.exe that is required to start the RemoteFX Manager process does not exist". That is weird, because I do have the rdvgm.exe in the C:\Windows\System32.
I have seen that there are some questions with the same error, but they are resolved by fixing the network switch or by killing devenv.exe after it shows "OS is starting". I have tried both, but it did not help. The network switch issue is different (I have seen it on a different computer - in that case the emulator starts correctly, but VS is not able to connect to it). I am stuck at "Starting (10%)".
What can I try to get it working? Windows Phone 8 emulator is working without any issue.
Thanks
The problem was that Hyper-V detected a graphic card which is able to work with RemoteFX (integrated Intel GPU) but the dedicated one (AMD Radeon) was not supported. I was not able to convince Hyper-V to ignore the dedicated one. When I disabled the RemoteFX support for Hyper-V (unchecked it in the Intel GPU setting in the Hyper-V configuration), it started working.
I found this Microsoft technical support desk yesterday. Its an on line chat with their technical people. I don't know if it covers all MS products. I was asking them about Outlook. Could be worth a try. I found it a touch slow at times, but ...
https://www.awasa.microsoft.com/en-GB/consultation/index?id=914801398064643&skuId=0
Hyper-V has problems enabling RemoteFX with some dual gpu graphics cards. Disabling one of the graphics cards in device manager solved the problem for me:
Disable one of the integrated graphics cards in device manager. I disabled Intel (R) HD Graphics 4600 and left NVIDIA GeForce GT 740M enabled.
Reboot Windows.
Delete the existing mobile phone virtual machines in Hyper-V Manager.
Start Visual Studio and deploy your app again.
I'll be honest, with much distress, I performed a complete factory reset. Reinstalled only Visual Studio 2015 Community edition (only with the tools I needed and not any other emulators such as Android), and it worked after setting up Hyper V as instructed via documentation on dev.windows.com

Visual Studio Emulator For Android - Hyper-V No Launch

Have been trying to launch the Visual Studio Emulator for Android for quite some time with the continued end result of an error code from the log of either [Critical] XDE Exit Code: 16, [Critical] XDE Exit Code: 3 or an infinite "Preparing Virtual Machine" status. I've tried numerous troubleshooting guides and different device profiles but haven't had any success, nor in reproducing what has worked for others.
Running Windows 8.1 Pro 64-bit
Things I have tried:
Both Repairing and Reinstalling the Program
Reinstalling Android Studio and SDK (along with the above in various orders)
Changing Administrative Permission through Microsoft Management Console
Running XdeCleanup.exe
Creating an internal switch in Hyper-V Manager (removing in between attempts)
All of the above by "Run as Administrator"
I have been able to create a virtual machine using the Internal Switch(s) I've created in Hyper-V Manager (albeit there is nothing to boot from) and can run Virtual Box successfully so I do not believe it is a question of my BIOS setup. I would greatly appreciate any insight you could offer or a possible solution that has worked for you with this emulator. Thanks for your help.
*Note that there is no instance of Visual Studio installed on this PC (the documentation suggests that it is not required).
Screens:
You need to be a member of the Hyper-V Administrators group. Go to Control Panel and then Local Users and Groups. Add your username to the "Hyper-V Administrators" group. If no group exists, create it.

Can't install Windows Phone 8.1 Emulator

So I have a HP laptop, and as many HP users know it's a nightmare to install Hyper-V on it. But I somehow managed. Hyper-V is running on my laptop and I have all the necessary hardware requirements:
SLAT is enabled
VT-x is supported and enabled
I'm running 64 bit Windows 8.1 Professional
I'm running Visual Studio 2013 Professional Update 3
Hardware D.E.P. is enabled and supported
And yet when I run the Phone Emulator installation I get the following display:
I can't figure out what's going on or why I keep getting the error. Hyper-V is running as shown:
I've spent two days already trying to figure this out and searching on Google for a solution to this problem. Some of the things I've tried:
Flashing my BIOS
Resolving issues with the Realtek BlueTooth driver (this causes issues with Hyper-V)
Reseting my BIOS
Doing a clean install of my whole system
Installing all Windows Updates
Installing all Visual Studio updates
Enabled / Disabled D.E.P.
Any advice is appreciated. If you need the log from the emulator installation let me know and I'll post it here.
Thanks
UPDATE:
I've attempted to install winsows server standard 2012 and tried enababling hyper-v and installing visual studio and the phone emulator there, and that works and I'm able to run the emulators with no problem.
When I tried the same thing back after installing windows 8 again it installs hyper-v but fails to start windows after installing visual studio update 2 with the phone images etc. The only way I can boot back into windows is if I turn off virtualization in bios.
So it turns out that HP Pavilion laptops support all that is needed to run Hyper-V, however it looks as if HP is blocking the SLAT functionality from working properly with Hyper-V thus not allowing it to run correctly. This looks like it's blocked at the BIOS level.
Updating the BIOS doesn't solve the issue.
The way I came to this conclusion is that Windows Server running Hyper-V runs the Windows Phone emulator with no problems, and it's a Microsoft decision to not require SLAT when running Hyper-V on Windows Server while requiring it on Desktop version of Windows.
Seeing how I paid extra for a more powerful laptop to be able to use features like Hyper-V, and to have an experience such as this due to a manufacturer configuration has left a bitter taste in my mouth. Needless to say this is the LAST time I'll ever buy an HP laptop.

VisualStudio 2013 Express phone emulator - device not found

Step1: Installed VisualStudio 2013 Express for Windows along with
Update 2.
Step2: Created a blank Windows Phone App.
Step3: Deployed the app to the Emulator 8.1 WVGA 4 inch 512MB.
The Emulator Displays with the message 'Windows Phone is Starting'. Times out after about 5 minutes with the following error messages:
Error: DEP6100: The following unexpected error occurred during
bootstrapping stage 'Connection to the device':
Error: DEP6200: Bootstrapping 'Emulator 8.1 WVGA 4 inch 512MB' failed.
Device cannot be found. App deployment failed. Please try again.
Hyper-V Manager shows the phone emulator running when the app is deployed to the
Phone Emulator.
Running my existing phone 8.0 apps with VisualStudio 2012 Professonal through the
phone emulator stopped working after installing VisualStudio 2013 Express with Update 2.
I get this error:
Windows Phone Emulator is unable to connect to the Windows Phone
operating system:
The phone did not respond to the connect request.
Some functionality might be disabled.
Tried running as administrator and repairing VisualStudio 2013 Express with no effect of this problem.
Anyone having similar issues ?
I solved this problem just now. Please take all windows update. Reboot, and check again for any remaining update. This was a bug earlier as well so microsoft fixed it in first update of windows 8.1
Then check any remaining extension update for your visual studio 2013. update there as well.
Try opening a sample app, it should work.
Regards
Kajal
I had same problem . first i fixed it with:
Updating windows
Uninstall / install Windows Phone SDK 8
Remove and add Hyper-v again ( maybe it is not necessary )
But problem came back and instead of previous solution i fixed the issue with :
going to windows firewall and then click on "restore defaults"
Open Hyper-V manager. Look at all the emulators that are running and turn them all off.
Then open visual studio and deploy your app.
This will start a fresh instance of Emulator.
I had the same problem with VisualStudio 2013 Professional and the latest Windows Phone 8.1 SDK and emulators (as of December 2014).
In my case I fixed it by changing the virtual switch 'WinPhoneEmulatorSwitch' in Hyper-V Manager from 'Internal network' to 'Private network'.
I found this solution at pekari.wordpress.com
I had your same problem and after many attempts resolved it this way:
Deactivate Hyper-V (and restart computer);
Go in the Device Manager and open the Network Adapters, here uninstall everything with the name "Hyper-V...", this will allow us to reactivate Hyper-V without any conflict;
Enable Hyper-V (and restart computer);
Finally launch the emulator (if it is the first time you launch it you will have to wait 5-10 minutes, so be patient and wait for it to load all apps it need).

Resources