示例免安装应用程序需要更新的 SDK

Sample instant app requires newer SDK

尽管我严格按照官方 emulator setup guide and sample project setup guide 进行操作,但问题底部仍然出现错误。

使用:
- Android Studio 3.0-Alpha7
- 带有 SDK 23

的像素模拟器

配置成功并能够在 Settings > Google > Instant Apps

中启用免安装应用

Side loading instant app failed: Failure when trying to read bundle. Instant App com.instantappsample requires an SDK version which is newer than the one installed on device. Please update the SDK on the device. Error while Uploading and registering Instant App

这可能是我们这边的问题。感谢您的报告。请尝试以下解决方法:

  • 设置 -> 应用程序
  • 查找 Google Play 即时应用服务。
  • 卸载此应用程序。

卸载时您可能会收到通知,请忽略。

现在再次运行您的免安装应用。这个问题应该会消失。

创建一个 API 26(又名 O)模拟器让我成功安装了 Instant App,同时遵循指南。来自 Github project android-instant-apps 的捐赠提示 我先尝试失败的解决方法:

  • 正在卸载“Google Play Services for Instant Apps”(来自其他答案)
  • 正在降级到 Android Studio 3.0 Canary 5
  • 使用可以 运行 即时应用程序的物理设备(Galaxy S6 SM-G920V,Android 7.0)

切换到 API O X86 模拟器对我有用。