android - 即时应用程序未在模拟器上运行

标签 android android-instant-apps

我有一个即时应用程序项目,经过几个障碍后我能够在模拟器上运行(Nexus 5X API 26)

Android: Instant app showing just white screen

现在,2 个月后,我尝试运行同一个项目,但没有成功

Nexus 5X(任何 api):

Adb devices 给出以下结果

emulator-5554 未经授权

enter image description here


像素 API 24:

侧面加载失败并显示消息:尝试读取 bundle 时失败。无法连接到 Google Play 服务。

ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED,resolution=空,消息=空

enter image description here

物理设备:

配置失败并显示消息:使用的设备未列入免安装应用程序部署的白名单。

根据文档的 Instant apps work on

Most Android devices running Android 5.1 (API level 21) or higher.

我试过的设备

  • 红米 Note 3(棉花糖)
  • Moto G4 plus(牛轧糖)

Android Studio 版本 3

如何让它发挥作用?

最佳答案

Pixel API 24 模拟器:

  1. 您需要安装具有 Google API 的 Android 系统镜像。您可以在创建新模拟器时看到这些图像,它们的名称类似于:“Android 7.1.1 (Google APIs)”。

  2. 确保您的模拟器中安装了最新版本的 Google Play 服务。为此:转到模拟器的扩展控件(通过单击三个点)-> Google Play -> 更新。请注意,这仅在您使用 Google API 安装系统镜像时可见(请参阅第 1 步。)

  3. 确保您在设备/模拟器上启用了免安装应用程序。请参阅:https://support.google.com/googleplay/answer/7240211?hl=en


物理设备:

只有少数选定的设备(例如 Pixel)与即时应用开发兼容。

参见:https://github.com/googlesamples/android-instant-apps/issues/1


参见 developer documents关于为 Instant Apps 开发设置设备或模拟器。

关于android - 即时应用程序未在模拟器上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47671320/

相关文章:

android - 按字母顺序对 Android 应用程序进行排序?

带有 native C++ 库的 Android Instant App 未发布到运行 Android N 的设备/模拟器

java - 如何从发布构建中排除模块

android - cordova 7.x 添加自定义平台——我们得到了哪些好处?

java - React Native - 值 '3130049174' 不适合 32 位有符号整数

android - Google Play 应用签名和即时应用

java - Instant Enabled App Bundle Not Downloading Full APK 而是显示错误

android - 未提供开发轨道中的即时应用程序

android - 找不到参数的方法 kapt()

android - 设置 ListView 的可见性