96

I am trying to add Android Q using AVD manager but it says: "Package "Android Emulator" with revision at least 28.1.9 not available." Has anyone tried this before? what should I do now to resolve this.

enter image description here

MnkDude
  • 1,028
  • 1
  • 6
  • 14

6 Answers6

91

Thanks to @JulianC I also set the emulator. I tried to download it standalone from the official site, but couldn't. Then switched to Canary Channel. I pressed Tools > SDK Manager, then Updates label and changed channel. Also pressed Check Now button and dismissed a dialog (Remind Me Later).

enter image description here

Then switch to Android SDK and updated needed emulators.

enter image description here enter image description here

Then reverted back to Stable Channel.

After several days of work I faced some visual bugs in the emulator. Sometimes I have to restart virtual devices from AVD Manager with Cold Boot Now:

enter image description here

Sometimes I recreate virtual devices in AVD Manager.

CoolMind
  • 26,736
  • 15
  • 188
  • 224
  • 1
    Thank you, it seems to be working with your workaround. I hope there will be no any incompatibilities. – Balázs Gerlei Apr 08 '19 at 07:30
  • @BalázsGerlei, you are welcome! You know, currently I have more problems with emulators, than had before. But probably it may be connected with moving `avd` folder to another disk. – CoolMind Apr 08 '19 at 09:17
  • 1
    Awesome, thanks a lot for the detailed explanation. I don't get why Google makes this so confusing by showing Android Q available on the stable channel even though you need to switch to canary channel for some dependencies, that's ridiculous... – Simon Ninon Apr 24 '19 at 21:49
  • @SimonNinon, agree with you! But I think, this is a chance for us to play with different combinations of SDK tools. Many developers never try to install unstable tools, so they can try to update at least the emulator. – CoolMind Apr 25 '19 at 07:14
32

Based on https://developer.android.com/preview/release-notes:

Note: If you try to download the Android Q Beta 2 emulator system images from within the emulator, you will be prompted to download the latest version of the emulator. If you are on the stable channel of Android Studio releases, then you might need to switch to the canary channel to be able to download this latest version of the emulator. You do not need to download all of Android Studio from the canary channel—you can download only the emulator from the canary channel from within the SDK Manager.

You have to use the Android Studio Canary build to get an updated emulator. This worked for me

Julian C
  • 545
  • 5
  • 6
17

As stated in the other answers, installing the update from the canary channel solves this problem. However, if you don't want to install Android Studio from canary channel, you can just use the sdkmanager tool. Just run this in the terminal:

sdkmanager --update --channel=3
Miloš Černilovský
  • 3,846
  • 1
  • 28
  • 30
12

************ EDIT ****************

Today I found version 29.0.6 available in stable channel.

Just click "Check for Updates..."


I found kind of solution.

  1. Go to Preferences -> Updates

  2. Select "Canary Cannel" and click "Check Now"

  3. Dismiss the updates "Remind me Later"

t3

  1. Go to Preferences -> Android SDK -> SDK Tools

  2. Click 3 times on "Android Emulator" checkbox (The state on the checkbox will be the same like in the beginning)

t5

  1. Go again to Preferences -> Updates

  2. Select "Stable Channel" and click "Check Now"

  3. Install recommended updates (android emulator to 29.0.3)

t8

Also you have to download Android Q Preview from Preferences -> Android SDK -> SDK Platforms

last hint

It works for me. Hope to help you :)

2

For a more recent answer:

Those installing from snap:

The reason is listed here:

This happens because Android Q is still in beta and therefore it’s only be available 
through the Canary and Development channels. 

The solution is to download Android 3.6 from here.

Daniel Connelly
  • 206
  • 2
  • 10
1

For anyone who bumps into this issue whilst using Android's Command Line tools, --channel=3, at least on Windows, will not actually net you the latest version of the Android emulator, and thusly as it is dependent on that Emulator version, the latest Android images (particularly google_apis_playstore;x86 v8)

As a workaround, I was able to manually install the package by fishing around in the repositories here: https://dl.google.com/android/repository/repository2-1.xml

I was sufficiently annoyed about having a broken tool that I made a lightweight Python tool to do the steps below for most any package, which is what I link below under automated version.

This will also work for the Android Studio versions in theory, but I haven't tested those personally. Your mileage may vary.

AUTOMATED VERSION

Clone or otherwise download this repo: https://github.com/FailSpy/android-sdk-alternative

With Python 3.6+ installed, go into the folder you cloned it to with your commandline, and run python downloadtools.py emulator (or any package name if you're looking for other packages)

That will then download and unzip the latest package for you in the location of your SDK (using env. variables ANDROID_SDK_ROOT or ANDROID_SDK_HOME)

MANUAL VERSION

To make this easiest, you'll need an existing install of the emulator

To find the latest version download URL:

Find on that XML file a <remotepackage> tag with path="emulator" featuring inside it the <channelRef> tag with 'channel-3' -- which signals latest version, locate the 'url' tag for the latest version for your platform (currently, emulator-windows-6549980.zip) and add that to the end of the previous URL -- replacing 'repository-2-1.xml'

e.g. https://dl.google.com/android/repository/emulator-windows-6549980.zip (if you're not too far from the future, you can just use this link rather than digging -- just replace 'windows' with 'darwin' for MacOS or 'linux' for Linux)

Take note also of the major, minor, and micro tags in the archive as well. We'll need this in a moment. In this case: 30, 0, and 16 respectively to make version 30.0.16

At that point, find your SDK install location

Find your currently installed emulator package in there under folder emulator, and edit your package.xml. Replace the major, minor, and micro with the version you found in the repo (or lazily with the version you know you need, though I don't recommend this)

Finally, delete the existing install (making sure to keep your edited package.xml!) and unzip your downloaded file into there, replacing your install.

Your SDK Manager should now recognize the emulator install as the version you set, and allow you to install the latest images.

failspy
  • 156
  • 1
  • 3