包“ Android 模拟器”修订版至少28.1.9不可用

我试图添加 Android Q 使用 AVD 管理器,但它说: “包“ Android 模拟器”与修订至少28.1.9不可用。”有人试过吗?我现在该怎么做才能解决这个问题。

enter image description here

21131 次浏览

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

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.

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

************ 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 :)

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.

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.