Unable to run Android

I wrote a Xamarin.Forms app. the app can run on iOS Simulator. But I am unable to run it on Android.

this is the Output when I tried to debug the app on Android simulator

Starting emulator my_device ...
Checking HAXM compatibility.
Emulator my_device cannot be started.
Runtime checks completed
NuGet package restore canceled.
Build has been canceled.

When I tried to Tools > Android >Android Device Manager to start the device is saw this

I am running on Visual Studio 2019(16.2.3)

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Which accelerating strategy are you using for your Android emulator, Hyper-V or HAXM?
    https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=windows

    If you use HAMX, please make sure your HAMX working correctly. Check whether your Hyper-V is disabled.

    If you use Hyper-V, you should enable Hyper-V and the Windows Hypervisor Platform, you can refer to the following steps to enable it https://devblogs.microsoft.com/visualstudio/hyper-v-android-emulator-support/

  • bczm8703bczm8703 Member ✭✭

    Hi.

    How do i check on this?

    Just to update. my Visual Studio 2019 is installed in Window Server 2012 R2. this windows is installed on a hyper-v terminal image. Not sure if this will affect it.

  • bczm8703bczm8703 Member ✭✭

    Hi. it seems that the issue may or may not be due to my VS running on a Hyper-V. Running the Android Emulator on my host(Windows 10), does not seems to have the issue.

    I am wondering is there any way to set my VS inside the Hyper-V to run the Android Emulator at the host?

    Something similar to how iOS simulator is run?

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    I am wondering is there any way to set my VS inside the Hyper-V to run the Android Emulator at the host?

    It seems you cannot open emulator in the Hyper-V, because CPU can only be virtualized once

  • bczm8703bczm8703 Member ✭✭

    @LeonLu said:

    I am wondering is there any way to set my VS inside the Hyper-V to run the Android Emulator at the host?

    It seems you cannot open emulator in the Hyper-V, because CPU can only be virtualized once

    ic.. thanks for replying.. wondering if it is possible for the Visual Studio in the VM to run the Emulator that is on the host PC?

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    No, you cannot run your emulator in VM

  • bczm8703bczm8703 Member ✭✭

    @LeonLu said:
    No, you cannot run your emulator in VM

    I dun mean to run the emulator on the VM.

    I mean to connect the Visual Studio that is in the VM to a remote Android Emulator

Sign In or Register to comment.