How to create an emulator device from the Xamarin Android SDK Manager?

ravl13ravl13 USMember ✭✭

Hello,

On Mac OS X, I've used the Xamarin Android SDK Manager to download, via the Platforms tab, these things:

Android 8.0

"Android SDK Platform", "Google APIs Intel x86 Atom System Image", Google Play Intel x86 Atom System Image"

Android 7.1

"Android SDK Platform", "Google APIs Intel x86 Atom System Image", "Google APIs Intel x86 Atom_64 System Image", "Google APIS ARM EABI v7a System Image", "Google APIs ARM 64 v8a System image", "Google Play Intel x86 Atom System Image"

Android 7.0

"Android SDK Platform", "Google APIs Intel x86 Atom System Image", "Google APIs Intel x86 Atom_64 System Image", "Google APIS ARM EABI v7a System Image", "Google APIs ARM 64 v8a System image", "Google Play Intel x86 Atom System Image"

My end goal is to have an phone emulator "device" to test out Android projects on a Mac machine via Visual Studio for Mac, which is using Android 7.0, 7.1 or 8.0. Yet, with all this stuff I installed, I STILL can't create a virtual device for any of those android versions.

In Visual Studio for Mac, I'm going to Tools > Google Emulator Manager. I click "Create..." to try and create a virtual device. For Device, I've tried picking Nexus 10, Nexus 9, Nexus One, 10.1" WXGA Tablet, etc. No matter what Device I pick, if I pick a target of Android 7.0. 7.1, or 8.0, the CPU/ABI section says "no system images installed for this target". But, for all these Devices, if I pick a target of Android 6.0, I always have CPU/ABI options of "Intel Atom (x86)" and "Intel Atom (x86_64)".

So in other words, I can only create Android 6 devices, but not Android 7 or higher. I've clearly done something with Android 6.0 in the past that allows me to create devices, but I have no idea what I did, since I can't get it to work for Android 7 or higher.

Anyone have suggestions on what I should be checking to allow me to properly create Android 7 AVDs?

Thanks for your time!

Answers

  • ravl13ravl13 USMember ✭✭
    edited November 2017

    Unfortunately, those links do not help. I'd already seen those. Those basically just say "you need to download the correct image"

    From my list of things installed in the original post via the Xamarin SDK Manager, we can see that I have downloaded and installed all possibly relevant images - I've downloaded all "Intel x86 Atom" images.

    The Android 6.0 AVD that is already available for use, was one installed by default by Visual Studio/Xamarin. I installed VS for Mac on another machine, to verify this. I cannot create any other AVDs besides for Android 6.0 - all others do not work, even though my checklist of things downloaded in my original post should let me create AVDs for Android 7.0 and higher.

    I'm having the exact same issue on a 2nd Mac machine. Creating AVDs using the Google Emulator Manager for Android 7.0 and higher just doesn't seem to work?

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    @ravl13

    Did you try selecting the Google APIs as your target?

    If you don't have that as a target, make sure you installed the Google APIs item for Android 7.0 (or whatever android version you want to create a Google APIs/Google Play Services AVD for). E.g.:

  • MichaelOConnorMichaelOConnor USUniversity ✭✭

    I ran into the same issue. No matter what I installed via the Xamarin SDK Manager I never had the "system images" for that target. It turns out that if from the Android AVD if I click on Tools and Manage SDK the old style SDK Manager shows up and shows nothing is installed. If I install the system images from there then I can create the images.

    Unfortunately even though I can create images by bypassing the Xamarin SDK Manager and can start those images, Visual Studio won't deploy to the running instances. I don't know if it's related or a different issue but after spinning up the emulator Visual Studio just says, "Starting AVD_for_Nexus..." and spins on that forever until I force kill Visual Studio.

  • JimKoehlerJimKoehler USMember ✭✭

    I having the same problem -- some System Images installed via Xamarin SDK Manager do not appear in the Android AVD Manager.

    For example, here's the Xamarin SDK manager:

    And here's what shows in the Android AVD Manager:

    As a cross-check, here's what shows in the Android SDK Manager which happens to match what is available the Android AVD Manager:

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai
    edited January 2018

    @JimKoehler

    It has been my experience that for targets that do not start with "Google APIs ...." will only work with system images that do not start with "Google APIs ..." and targets that do start with "Google APIs ...." will only work with system images that do start with "Google APIs ....". So in your screenshot above, that looks correct, only the system images that DO NOT start with "Google APIs ...." are shown. If you want to use the Google APIs system images you will have to select the target "Google APIs (Google Inc.) - API 2" and then you should see the "Google APIs Intel x86 Atom ..." system images.

    Also your "cross check" screenshot is showing what you have installed for API 25, not 21 as is shown in the other 2 screen shots.

    That said, It seems that the "Google APIs" (exactly that) element in Android 7.1 API 25 is no longer there in the SDK Manager like it is for all lower API levels, and I think that now the "Google APIs" are rolled into the "Android SDK Platform 25". I believe this because not only is there no more "Google APIs" element for Android API 25 and higher, but there are also no longer any non-Google API system images, i.e. no more images that DO NOT begin with "Google APIs ..." i.e. no more "Intel x86 Atom system image" or "Intel x86 Atom_64 system image".

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    @MichaelOConnor

    That sounds like you may possibly have two versions of the Android SDK, one which is referenced by Android Studio and another that is referenced by Visual Studio. You should be able to check the path to the android SDK in each of the SDK Managers, i.e. Google's and Xamarin's.

  • JimKoehlerJimKoehler USMember ✭✭

    @JGoldberger

    Thanks for the reply. But I'm still thinking that the Xamarin SDK Manager is downloading System Images that neither the Android AVD Manager nor the Android SDK Manager will recognize. This is all on Windows but I think Mac has the same problem (need to confirm that).

    Here are updated screenshots.

    Xamarin SDK Manager

    Android AVD Manager showing only the two Intel (non-Google) images instaleld:

    Android SDK Manager only sees that the Intel images are installed:

    But if I then add the rest of the system images via the Android SDK Manager:

    Now the Android AVD Manager shows them.

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    @JimKoehler
    Can you verify the paths you see for the Android SDK from both the Xamarin SDK Manager and the Android SDK Manager? Perhaps you have dual Android SDKs on your system, like I suggested might be the case for Michael above?

  • JimKoehlerJimKoehler USMember ✭✭

    Xamarin SDK Manager

    Android SDK Manager

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai

    @JimKoehler

    So it seems that this may be due, as you suspected, to some mismatch between Xamarin's SDK Manager and Android's AVD Manager.

    There is a Preview of a new Xamarin AVD Manager that should resolve this issue:
    https://developer.xamarin.com/guides/android/getting_started/installation/android-emulator/xamarin-device-manager/

    or you can use Android's avdmanager CLI tool:
    https://developer.android.com/studio/command-line/avdmanager.html

  • JimKoehlerJimKoehler USMember ✭✭

    Awesome! I'll give the Xamarin AVD Manager a try.

  • MarcoRinaldiMarcoRinaldi ITMember ✭✭

    @JGoldberger said:
    @JimKoehler

    So it seems that this may be due, as you suspected, to some mismatch between Xamarin's SDK Manager and Android's AVD Manager.

    There is a Preview of a new Xamarin AVD Manager that should resolve this issue:
    https://developer.xamarin.com/guides/android/getting_started/installation/android-emulator/xamarin-device-manager/

    or you can use Android's avdmanager CLI tool:
    https://developer.android.com/studio/command-line/avdmanager.html

    Thanks! This solved the issue for me!

  • brandonhartmanbrandonhartman USMember

    Is there a way to run the device manager without admin?

    Our organization accounts don't have admin privileges, so we have a separate local account that has admin privileges.
    The problem is it creates the devices under the separate user so nothing shows up in visual studio for a run target.

Sign In or Register to comment.