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

时间:2017-12-06 09:52:07

标签: android android-instant-apps

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

Android: Instant app showing just white screen

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

Nexus 5X(任何api):

Adb devices给出以下结果

emulator-5554 unauthorized

enter image description here

Pixel APi 24:

侧面加载失败,显示消息:尝试阅读捆绑时失败。无法连接到Google Play服务。

ConnectionResult {statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}

enter image description here

物理设备

配置失败并显示消息:所使用的设备未列入Instant Apps部署的白名单。

根据doc的即时应用程序

  

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

我试过的设备

  • Mi Redmi Note 3(棉花糖)
  • Moto G4 plus(牛轧糖)

Android studio版本3

如何才能工作?

1 个答案:

答案 0 :(得分:1)

Pixel API 24模拟器:

  1. 您需要安装包含Google API的Android系统映像。您可以在创建新模拟器时看到这些图像,它们的名称如下:" Android 7.1.1 (Google API)"。

  2. 确保您的模拟器中包含最新版本的Google Play服务。为此:转到模拟器的扩展控件(通过单击三个点) - > Google Play - >更新即可。请注意,只有使用Google API安装系统映像时才能看到此信息(请参阅步骤1.)

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

  4. 物理设备:

    只有少数选定的设备(如Pixel)与Instant Apps 开发兼容。

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

    请参阅developer documents有关为Instant Apps开发设置设备或模拟器的信息。