Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Android 10 Emulator setup

JoeMankeJoeManke USMember ✭✭✭✭✭

Since Android 10 came out a few weeks ago, I've been trying to get an emulator working to no avail. No matter which system image I use it just fails to start. Emulators on lower API versions work fine.

I have the following things installed through the Android SDK Manager in VS2019:

  • Android SDK Platform 29, Version 3
  • Android SDK Tools, Version 26.1.1
  • Android SDK Platform-Tools, Version 29.0.4
  • Android SDK Build-Tools, Version 29.0.2
  • Android Emulator, Version 29.2.1
  • Android Support Repository, Version 47.0.0
  • Google Repository, Version 58
  • Google USB Driver, Version 11
  • Intel x86 Emulator Accelerator (HAXM installer), version 7.5.2

Any tips?

Best Answers

  • JoeMankeJoeManke USMember ✭✭✭✭✭
    Accepted Answer

    So I ended up just uninstalling every API 29 related - SDK, system images, platform tools, build tools, emulator - and HAXM, and reinstalled them all (through Android Studio) and now it's working. :|

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Did you update your VS to the 16.3? You can refer to the following link, VS 16.3 support the Android10.0
    https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes#16.3.0

    If still cannot open your emulator, you can click the edit the my device, check the property if it is like following screenshot. If you get the result please change the value to 1G or 800M

  • JoeMankeJoeManke USMember ✭✭✭✭✭

    Yes, I am on VS2019 16.3.1.

    The data partition size was automatically set to 2G.

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Please check the settings in the Android SDK and Tools. I changed following settings i can run the android 10 normally.

  • JoeMankeJoeManke USMember ✭✭✭✭✭

    @LeonLu As I listed in the initial post, I already have all of those tools installed and have attempted using every system image available.

  • JoeMankeJoeManke USMember ✭✭✭✭✭

    Perhaps this will help diagnose things... I'm seeing double for my Android 10 system images. If I install one, next time I open the window both of the boxes are checked.

    I also have Android Studio on my PC, though I don't use it regularly. It is pointing to the same directory for my Android SDK and if I look at the SDK manager there it only lists each image once.

  • JoeMankeJoeManke USMember ✭✭✭✭✭

    Logs when I try to start & deploy to the Android 10 emulator:

    Starting emulator Pixel_3_API_29 ...
    C:\Android\android-sdk\emulator\emulator.EXE -no-boot-anim -avd Pixel_3_API_29 -prop monodroid.avdname=Pixel_3_API_29
    HAX is working and emulator runs in fast virt mode.
    C:\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: error while loading state for instance 0x0 of device 'goldfish_pipe'
    deleteSnapshot: for default_boot
    
  • LeonLuLeonLu Member, Xamarin Team Xamurai
    edited October 2019

    Cound you open the android 10 in the Android Studio? If not, based on your error message, you can click the Wipe Data and Cold Boot Now like following screenshot.

    Visual studio used the SDK is same with the Andriod studio.

    I'm seeing double for my Android 10 system images. If I install one, next time I open the window both of the boxes are checked.
    Yes, I met this issue as well, but I see your screenshot(Android SDKs and Tools), it seems that you did not install Google APIs Intel x86 Atom System Image and Google Play Intel x86 Atom System Image, please check them.

    I install android 10 emulator at the first time, I met the same result as you, then I update HAXM installer version to the latest and change the Android emulator version to the 29.2.1, Android 10 emulator could running normally.

  • JoeMankeJoeManke USMember ✭✭✭✭✭

    @LeonLu said:
    Cound you open the android 10 in the Android Studio? If not, based on your error message, you can click the Wipe Data and Cold Boot Now like following screenshot.

    I've tried that, didn't work.

    Yes, I met this issue as well, but I see your screenshot(Android SDKs and Tools), it seems that you did not install Google APIs Intel x86 Atom System Image and Google Play Intel x86 Atom System Image, please check them.

    At the time I took those screenshots, I did not have them installed, but I have installed and uninstalled all available system images several times before and after taking said screenshots.

    I install android 10 emulator at the first time, I met the same result as you, then I update HAXM installer version to the latest and change the Android emulator version to the 29.2.1, Android 10 emulator could running normally.

    I had HAXM and Android emulator updated to the latest versions before I started attempting to make an emulator.

    I appreciate that you're trying to help me, but everything you've said is something I've already tried.

  • JoeMankeJoeManke USMember ✭✭✭✭✭
    Accepted Answer

    So I ended up just uninstalling every API 29 related - SDK, system images, platform tools, build tools, emulator - and HAXM, and reinstalled them all (through Android Studio) and now it's working. :|

  • thisismyselfthisismyself Member ✭✭

    @LeonLu said:
    Please check the settings in the Android SDK and Tools. I changed following settings i can run the android 10 normally.

    This should be an accepted answer as well. Thanks @LeonLu !

  • JohnBlack.2526JohnBlack.2526 USMember ✭✭

    If anyone ends up here trying to find a solution to Android 10 emulator issues, Nicolas' solution re HAXM worked for me.

Sign In or Register to comment.