Ok so my Visual Studio Android emulators stopped working this morning. First I was was receiving a networking error and so I tried to delete and re-create them, but the creation keeps getting stuck on "Copy .vhd files and creating virtual machine". The last time I tried it I let it sit on that step for over half an hour, and that was after trying first this Visual studio (2015) emulator for android not working - XDE.exe - Exit Code 3 then this Visual studio android emulator will not start fully
Oh and I completely uninstalled and re-installed Visual Studio Emulator for Android.
Any thoughts would be greatly appreciated.
I finally got a VM to download and execute after reinstalling Hyper-V (un-check Hyper-V from Windows Features, reboot, re-check it, reboot). I've gone through many of the referenced cleanup steps many times prior to trying that, though I did perform a repair of the Visual Studio Emulator for Android and deleted all of the device profiles just before reinstalling Hyper-V.
Related
For some reason ever since I updated Android Studio to version 4.1, whenever I try to run the emulator I get this error:
Error while waiting for device: The emulator process for AVD Pixel_2_API_29 was killed.
I have tried reinstalling android studio, cold booting the device and literally everything I could think of.
newbie here but wanted to learn more about developing apps, so downloaded Android Studio to do an intro lesson and was frustrated by the same issue -emulator was "killed" before opening. Well, I think I saw a vague suggestion somewhere to uninstall Emulator using SDK Manager (SDK Manager - System Settings - Android SDK - SDK Tools), then reinstalling from same place (SDK Manager). Voila! It worked for me. The emulator works and I see my virtual device. As a newbie you can imagine how cryptic this all was for me, but it's one way to learn, I guess!
For a while I was able to run my app in the android emulator that was installed with Android Studio.
I have since updated SDKs and installed some x86 emulators with SDK manager and now none of the emulators will run properly no matter what I do..
They won't run if I select the run button in android Studio and they won't run if I select the run button I AVD manager.
If I view windows task manager I can see the emulator starting up but they just crash before the emulator window appears.
So what do I do here? Uninstall bloody Android Studio and start over???? Because nothing else that I have googled on this problem works.
All the solutions others have proposed appear to be very vague and a result of random trial and error rather than inside knowledge.
I have tried deleting my emulators and creating new ones.
I have tried wiping data in AVD manager.
I have tried changing the SDK versions in the emulators.
I have tried switching between ARM and X86 system images.
I have tried switching between 'Software GLES' and 'Automatic'
None of them fixes the problem.
The emulators start up in task manager but crash before anything becomes visible while android studio waits in vane for the device to start up.
I am new to Xamarin. I used Xamarin. Forms template to create a sample mobile solution in Visual Studio 2017. The process created four projects Xamarin PCL, Xamarin Android, Xamarin.iOS and Xamarin.UWP. Without making any modification to the generated solution, I am trying to run it.
The first issue is, when I set the UWP as the starting project, the Windows emulator shows up and runs the app perfectly. But when I try to do the same with Android, I get different errors at different times based on the environment changes I make. Finally, using the visual studio android emulator, the Phone UI shows up but not my app. In the background, I can see that Visual Studio completed the build process successfully without any errors but the deploy process simply hangs. I left the deploy running overnight but still running in the morning. Here is my environment.
Intel Core i7 processor
Virtualization enabled in BIOS
Windows 10 Education
32GB RAM
Hyper-V disabled in Windows
Executed bcdedit /set hypervisorlaunchtype off in the command window and rebooted.
I tried setting the above environment in different combinations but none of them seem to make the app work. When I use an android emulator from android SDK, the build process throws errors. The only emulator that even builds is the visual studio emulator. But the deploy hangs.
A second issue I have is, I have installed android SDK for version 24 and 25. But in the emulator dropdown, I can only see the emulators for 23. I checked the installation path both in visual studio and android SDK manager and they both point to the same installation folder. What do I need to make the emulators for version 24 and 25 usable?
I repeat, I did not make any change to the generated solution in visual studio before running it. I have been at it for the past three days and couldn't make it work. Please help.
I just installed Visual Studio 2017 (on Win10 15063.138) and found, like you, Xamarin projects won't deploy to Android. Here's how I got running:
Updated everything in the Android SDK Manager.
Installed the new, improved Android Emulator from MS:
https://www.visualstudio.com/vs/msft-android-emulator/
Used that to download/install an API level 23 (6.0 Marshmallow)
emulator
Started that emulator using the same tool (you'll see it running in Hyper-V Manager)
Selected same emulator in VS for deploy/debug (the emulators that ship with VS are painfully slow)
In VS, selected Android project for start-up and verified build and deploy to Android in build config mgr.
Note: MS doesn't appear to have any emulators above API level 23, so Compilation and Target settings for your Android project can be the latest, but the minimum target will have to be 6.0 (API 23).
After pulling my hair for the past few days, I finally got my Xamarin.Forms Android App to show my page on the emulator. Thanks to all the members for their suggestions. Ryan's suggestion helped a lot ( I +1ed him, thanks Ryan) but did not solve my problem. I googled further and found a suggestion that asked to change the following setting which did it for me finally. So, if anyone else get stuck like I did, please do the following (in addition to cleaning up and updating all packages):
Open up the setting for your Hyper-V vm for your emulator (while the VM is off).
Expand the Processor node on the left and click on "Compatibility".
Now put a check mark on "Migrate to a physical computer with a different processor version" on the right.
Start your emulator in the Visual Studio Emulator tool.
Now, start debug your android project in VS using the same emulator that is already running.
After a delay (there is always a delay), your app will show up on the emulator. Yey!!
I had the emulator running once and had to remove it because I had to work with virtualBox as you cannot run hyper-v and virtual box together.
As I had the emulator running, it means that my system is compatible. I am running windows 10 with i7 processor.
The installation process went smooth but when I tried to create a virtual device the process gets stuck at
Copying .vhd files and creating virtual machine
I tried following the steps shown here Visual studio (2015) emulator for android not working - XDE.exe - Exit Code 3
But It does not work.
what is the way where I can completely remove everything and start from scratch.
Well, if you want to start from scratch, my suggestion would be, make a backup of projects, uninstall VS 15, uninstall emulator, uninstall other plug-in, clear temp, restart, then install again. Quite a long process, which is anyway should not be recommended.
Week ago I created Android vms and I was able to run from Hyper-v window but i wasn't able to run from VS for Android. Yesterday I removed all vms from Hyper-v becouse i had problems with Windows Phone virtual machines. Now I have luckly working Windows Phone machines but I cant make any Android machines becouse every time when I create new machine VS for Android freeze on "Copying .vhd files and creating virtual machine". I tried to reinstall VS Emulator for Android but it doesnt help. What I have to do for fix this?
Same thing happend to me as well, and it very easy to fix this
uninstall visual studio emulator for android
restart your pc/laptop
download and install fresh copy of visual studio emulator for android
let me if this works for you
Feel Free to ask if any error occurs