Visual Studio: Xamarin - Error starting Android Emulator

14,565

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

Platforms tab

Tools

Tools tab

Solution 2

I had also the same problem, but I have already fixed as next process.

  1. disable both [Hyper-V] and [Windows Hypervisor Platform].
  2. restart PC.
  3. enable both [Hyper-V] and [Windows Hypervisor Platform].
  4. 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

  1. Disable the hyper-v via the following command on command line and reboot.

    bcdedit /set hypervisorlaunchtype off

  2. 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.

Share:
14,565

Related videos on Youtube

amrit
Author by

amrit

Updated on June 26, 2022

Comments

  • amrit
    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) enter image description here

    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

    enter image description here

    Same Error when Emulator is not using Google Play/Google API

    enter image description here

    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

    Visual Studio 2019 enter image description here

    Windows Features On/Off (see attached - shows Hyper V / Virtualization enabled as per documentation): WindowsFeatures enter image description here

    I tried this way too - adding the Virtual Machine Platform - same error enter image description here

    Android SDK Settings

    Android SDK - Platform

    Android SDK - Tools - part 1

    Android SDK - Tools - part 2

    Android SDK - Tools - part 3

    Android SDK Version: enter image description here

    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? enter image description here

    I've now also included the Android SDK Repository under the tools - but this is still not coming through: enter image description here

    • nevermore
      nevermore over 3 years
      Have a look at solutions in this thread may help.
    • amrit
      amrit over 3 years
      thanks 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
      nevermore over 3 years
      Are you using the latest visual-studio? Can you try to create a new emulator without check Google Play?
    • amrit
      amrit over 3 years
      yes - 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
      nevermore over 3 years
      It looks like everything is installed well on your side. You can report a problem inside Visual-Studio and get more help.
    • nevermore
      nevermore over 3 years
      I think you should report this problem to Developer Community.
    • nevermore
      nevermore
      Yes, wait response there.
    • amrit
      amrit
      thanks for this suggestion - I've just done that too: developercommunity.visualstudio.com/content/problem/1198435/‌​…
  • amrit
    amrit over 3 years
    Thanks 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
    amrit over 3 years
    FYI - the link I shared describes both debugging using a physical Android device and using the Android Emulator.
  • Blanthor
    Blanthor over 3 years
    You 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
    amrit over 3 years
    thanks 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
    Blanthor over 3 years
    Added pictures of SDK Manager. You can check your version under the settings on the lower right of the Android SDK and Tools window.
  • amrit
    amrit over 3 years
    Thank 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
    amrit over 3 years
    Thanks 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
    Emil almost 3 years
    these 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

Related