Visual Studio: Xamarin - Error starting Android Emulator
Solution 1
You should also check Virtual Machine Platform in Turn Windows features on or off. Also, note that the tutorial that you linked to use an Android device for USB debugging.
EDIT
Here are my Android SDK Manager settings
Platform Settings
Tools
Solution 2
I had also the same problem, but I have already fixed as next process.
- disable both [Hyper-V] and [Windows Hypervisor Platform].
- restart PC.
- enable both [Hyper-V] and [Windows Hypervisor Platform].
- restart PC.
Solution 3
I had exactly the same problem, so I went to my UEFI settings and I realized that my SVM Mode was disabled. I don't know what motherboard you have but for Gigabyte this usually is in:
M.I.T → Advanced CPU Core Settings → SVM Mode
Solution 4
I had the same problem, solved it by turning on the virtualization in the bios
Solution 5
-
Disable the hyper-v via the following command on command line and reboot.
bcdedit /set hypervisorlaunchtype off
-
Enable it back with the following command and reboot.
bcdedit /set hypervisorlaunchtype auto
Now my emulator runs!
It seems like there is some kind of conflict with virtualization as per this and it effects creating Linux VMs too but these steps clears it.
The answer by suzukimi is right but I provided the commands and some additional info.
Related videos on Youtube
amrit
Updated on June 26, 2022Comments
-
amrit almost 2 years
Problem encountered on https://dotnet.microsoft.com/learn/xamarin/hello-world-tutorial/devicesetup
Operating System: Windows 10 Pro
Using the Hello World xamarin example in Visual Studio - I'm unable to start the Android Emulator.
When I click on the Run button in the Android Device Manager - the error appears immediately (See attached)
Error-AndroidDeviceManager (Emulator including Google Play/Google API)
Emulator error
Device error: WARNING: unexpected '-prop' value ('monodroid.avdname=pixel_2_pie_9_0_-_api_28'), only 'qemu.' properties are supported WARNING: unexpected '-prop' value ('emu.uuid=4b63b139-cc77-4b66-9200-0d25f8fc545e'), only 'qemu.' properties are supported
Same Error when Emulator is not using Google Play/Google API
Same Error when Emulator is not using Google Play/Google API
Windows Specifications Edition: Windows 10 Pro Version: 1909
Processor AMD Ryzen 9
Task Manager: Performance: Virtualization is Enabled
cmd - systeminfo: Hyper-V Requirements: VM Monitor Mode Extensions: Yes Virtualization Enabled In Firmware: Yes Second Level Address Translation: Yes Data Execution Prevention Available: Yes
Windows Features On/Off (see attached - shows Hyper V / Virtualization enabled as per documentation): WindowsFeatures
I tried this way too - adding the Virtual Machine Platform - same error
Android SDK Settings
Could the issue be related to the Android SDK Tools - only showing Android SDK Command-line Tools versions 1.0 to 2.1? Could the issue be related to Android Repository perhaps missing on the bottom right hand side?
I've now also included the Android SDK Repository under the tools - but this is still not coming through:
-
nevermore over 3 yearsHave a look at solutions in this thread may help.
-
amrit over 3 yearsthanks Jack - that's helpful. I took a look at the thread, looks like I've done the same - I double checked the Android SDK - looks okay? I'll update main message with screenshots of my Android SDK settings.
-
nevermore over 3 yearsAre you using the latest visual-studio? Can you try to create a new emulator without check Google Play?
-
amrit over 3 yearsyes - latest version of Visual Studio - VS 2019 - I'll add a screenshot with the details to the main message. I tried without Google play - same exact error, again I'll add a screenshot with the details to the main message. I do think the issues lie with the settings somewhere - but unsure exactly which settings need updating.
-
nevermore over 3 yearsIt looks like everything is installed well on your side. You can report a problem inside Visual-Studio and get more help.
-
nevermore over 3 yearsI think you should report this problem to Developer Community.
-
nevermoreYes, wait response there.
-
amritthanks for this suggestion - I've just done that too: developercommunity.visualstudio.com/content/problem/1198435/…
-
-
amrit over 3 yearsThanks for this suggestion - I've updated my Virtual Machine Platform - but same error appears. I'll update the main query with screenshot, in case there's anything else that needs to be updated. I also have tried the other option of using an Android device directly - which works fine - no issues there, but I wanted to get the Android Emulator working in the best way, saves me having to deploy on to my own device each time.
-
amrit over 3 yearsFYI - the link I shared describes both debugging using a physical Android device and using the Android Emulator.
-
Blanthor over 3 yearsYou appear to have different settings in Tools than I have. Make sure that you have the latest update of Android SDK Manager and Android Device Manager. As a comparison I have: Windows 10 Core i7, Device Manager version16.6.0.48. Finally it helps to just create a new emulator in Device Manager. I've had to do this fairly recently.
-
amrit over 3 yearsthanks for this - can you post a screenshot of your settings that I could try and update? Android SDK Manager looks to be the latest. How do I check/update the Android Device Manager? Also, can you send a screenshot of your Emulator in Android Device Manager? For the emulator, I setup using the default selection, I can try your setup in case it helps.
-
Blanthor over 3 yearsAdded pictures of SDK Manager. You can check your version under the settings on the lower right of the Android SDK and Tools window.
-
amrit over 3 yearsThank you! I've added Android SDK Manager screenshots to the main message too. My Android SDK Manager is 16.7.0.13 My Android SDK Tools - only showing Android SDK Command-line Tools versions 1.0 to 2.1... is that correct? The Android Repository is showing on the bottom right hand side - again not sure if this is related either.
-
amrit over 3 yearsThanks for this - using an ASUS motherboard, I already have SVM Enabled in the UEFI settings: ______ ______ Advanced -> CPU Configuration -> SVM Mode ______ I believe this is also shown in the command prompt that I highlighted earlier: ______ command prompt, cmd: systeminfo ______ Hyper-V Requirements: VM Monitor Mode Extensions: Yes ______ Virtualization Enabled In Firmware: Yes ______ Second Level Address Translation: Yes ______ Data Execution Prevention Available: Yes
-
Emil almost 3 yearsthese cmds are the solution indeed. below cmd from Vitenuto is the reason causing this error. I am not sure the difference. they look same cmd