修订版至少为 28.1.9 的软件包 "Android Emulator" 不可用

Package "Android Emulator" with revision at least 28.1.9 not available

我正在尝试使用 AVD 管理器添加 Android Q,但它显示:"Package "Android 模拟器“至少 28.1.9 版本不可用。”有人试过这个吗?我现在应该怎么做才能解决这个问题。

基于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.

您必须使用 Android Studio Canary 版本来获取更新的模拟器。这对我有用

感谢@JulianC 我也设置了模拟器。我试图从官方网站独立下载它,但不能。然后切换到金丝雀频道。我按 Tools > SDK Manager,然后按 Updates 标签并更改频道。同时按下 Check Now 按钮并关闭对话框 (Remind Me Later)。

然后切换到 Android SDK 并更新所需的模拟器。

然后恢复到稳定频道。

经过几天的工作,我在模拟器中遇到了一些视觉错误。有时我必须使用 Cold Boot Now:

从 AVD Manager 重新启动虚拟设备

有时我会在 AVD Manager 中重新创建虚拟设备。

如其他答案所述,从 Canary 频道安装更新可以解决此问题。但是,如果您不想从 Canary 频道安装 Android Studio,您可以只使用 sdkmanager 工具。只需 运行 终端中的这个:

sdkmanager --update --channel=3

************ 编辑 ****************

今天发现稳定版29.0.6可用

点击"Check for Updates..."


我找到了某种解决方案。

  1. 转到首选项 -> 更新

  2. Select "Canary Cannel" 然后点击 "Check Now"

  3. 关闭更新"Remind me Later"

  1. 转到首选项 -> Android SDK -> SDK 工具

  2. 在"Android Emulator"复选框上单击3次(复选框上的状态将与开始时相同)

  1. 再次转到首选项 -> 更新

  2. Select "Stable Channel" 然后点击 "Check Now"

  3. 安装推荐的更新(android 模拟器到 29.0.3)

您还必须从首选项 -> Android SDK -> SDK 平台

下载 Android Q Preview

对我有用。 希望能帮到你:)

最近的回答:

从 snap 安装的:

列出原因here:

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

解决方法是从here下载Android 3.6。

对于在使用 Android 的命令行工具时遇到此问题的任何人,--channel=3,至少在 Windows 上,实际上不会为您提供最新版本的Android 模拟器,因此,由于它依赖于该模拟器版本,最新的 Android 图像(特别是 google_apis_playstore;x86 v8)

作为一种解决方法,我可以通过在此处的存储库中查找来手动安装软件包: https://dl.google.com/android/repository/repository2-1.xml

我对有一个损坏的工具感到非常恼火,所以我制作了一个轻量级 Python 工具来为大多数任何包执行以下步骤,这就是我在下面 link 下的自动化版本。

这在理论上也适用于 Android Studio 版本,但我还没有亲自测试过这些版本。您的里程可能会有所不同。

自动版本

克隆或以其他方式下载此存储库:https://github.com/FailSpy/android-sdk-alternative

安装 Python 3.6+ 后,使用命令行进入您将其克隆到的文件夹,然后 运行 python downloadtools.py emulator(或者任何包名,如果您正在寻找其他包)

然后将在您的 SDK 位置为您下载并解压缩最新的软件包(使用环境变量 ANDROID_SDK_ROOT 或 ANDROID_SDK_HOME)

手动版

为简化此过程,您需要安装现有的模拟器

寻找最新版本下载URL:

XML file 上找到一个带有 path="emulator"<remotepackage> 标签,其中包含带有 'channel-3' 的 <channelRef> 标签——这表示最新版本,找到您平台最新版本的 'url' 标签(目前为 emulator-windows-6549980.zip),并将其添加到之前 URL 的末尾——替换 'repository-2-1.xml'

例如https://dl.google.com/android/repository/emulator-windows-6549980.zip(如果你离未来不太远,你可以只使用这个 link 而不是挖掘 - 只需将 'windows' 替换为 'darwin' for MacOS 或 'linux' 对于 Linux)

还要注意存档中的 major、minor 和 micro 标签。我们马上就需要这个。在这种情况下:30、0 和 16 分别构成版本 30.0.16

到那时,找到你的 SDK install location

在文件夹 emulator 下找到您当前安装的模拟器包,然后编辑您的 package.xml。将 major、minor 和 micro 替换为您在 repo 中找到的版本(或者懒惰地替换为您知道需要的版本,但我不推荐这样做)

最后,删除现有安装(确保保留您编辑的 package.xml!)并将下载的文件解压缩到那里,替换您的安装。

您的 SDK 管理器现在应该将模拟器安装识别为您设置的版本,并允许您安装最新的图像。