侧载即时应用程序失败:阅读捆绑超时

时间:2017-07-04 14:07:22

标签: android android-studio android-emulator android-instant-apps

无法使用Android模拟器测试Instant Apps!我每次都" Side loading即时应用程序失败:阅读包已超时。"


我正在使用, Android Studio 3.0 Canary-5

模拟器:使用Google API运行Android 6.0(API级别23)x86的Nexus 5X映像。 Google API英特尔x86 Atom系统映像(修订版21)

  

注意:更新Android Studio 3.0 (Canary-4> Canary-5)&   来自修订版(20> 21)的仿真器系统映像。我无法运行   即时App通过模拟器。我总是收到错误消息" Side loading instant app failed:read bundle out out out。"

com.google.android.gms.persistent E/InstantApps: DomainFilterImpl: Error while reading domain filter from WHAPI
                                                                              java.util.concurrent.ExecutionException: awjr: INVALID_ARGUMENT: Application credential header not valid. Please fix the client to pass a valid application credential header.
                                                                                  at java.util.concurrent.FutureTask.report(FutureTask.java:94)
                                                                                  at java.util.concurrent.FutureTask.get(FutureTask.java:164)
                                                                                  at tey.get(:com.google.android.gms:1)
                                                                                  at tir.a(:com.google.android.gms:25)
                                                                                  at tir.a(:com.google.android.gms:16)
                                                                                  at tir.a(:com.google.android.gms:9)
                                                                                  at tir.b(:com.google.android.gms:0)
                                                                                  at tio.b(:com.google.android.gms:0)
                                                                                  at com.google.android.gms.instantapps.routing.DomainFilterUpdateChimeraService.a(:com.google.android.gms:14)
                                                                                  at tiu.run(:com.google.android.gms:0)
                                                                                  at lhb.run(:com.google.android.gms:24)
                                                                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                                  at lmc.run(:com.google.android.gms:0)
                                                                                  at java.lang.Thread.run(Thread.java:818)
                                                                               Caused by: awjr: INVALID_ARGUMENT: Application credential header not valid. Please fix the client to pass a valid application credential header.
                                                                                  at awjn.c(:com.google.android.gms:0)
                                                                                  at lbb.a(:com.google.android.gms:97)
                                                                                  at tem.b(:com.google.android.gms:43)
                                                                                  at tem.a(:com.google.android.gms:0)
                                                                                  at tez.call(:com.google.android.gms:1)
                                                                                  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                  at lhb.run(:com.google.android.gms:24) 
                                                                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
                                                                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
                                                                                  at lmc.run(:com.google.android.gms:0) 
                                                                                  at java.lang.Thread.run(Thread.java:818) 

    W/ActivityManager: Unable to start service Intent { act=com.google.android.instantapps.devman.iapk.LOAD cmp=com.google.android.instantapps.devman/.iapk.IapkLoadService (has extras) } U=0: not found

感谢您的帮助。


更新

在Android工作室发行说明here中找到解决方案。这是Android Studio canary-5下的已知问题

  

即时应用配置缓存的可靠性问题。如果你手动   取消设置您的设备或模拟器图像以进行即时应用程序开发,   然后从Android Studio部署即时应用程序   将失败,因为Android Studio将不会配置您的   再次设备/模拟器图像。要解决此问题:进入   运行配置对话框,然后选择   左侧窗格。单击“之前”下的“即时应用程序配置”任务   启动:Gradle-aware Make,Instant App Provision“点击编辑(   铅笔图标)选中“清除已配置的设备缓存”

4 个答案:

答案 0 :(得分:3)

该设备被视为“已经为即时应用程序配置”,但事实并非如此,可能是因为之前使用过具有相同序列号(相同模拟器)的其他设备并进行了修改,或者因为该设备已在外部进行了修改(不是由Android Studio修改) )。

解决方法是在每次运行之前清除缓存: InstantApp运行配置 - >在运行任务之前 - >提供即时应用任务 - >编辑 - >清除配置的设备缓存。

答案 1 :(得分:1)

使用compileSDK 26targetSDK 26构建项目时出现类似错误。 回到SDK 25supportLibrary 25.4.0解决了我的问题。

答案 2 :(得分:1)

devman.apk文件夹下缺少

sdk/extras/google/instantapps/tools/apks/debug。请在运行即时应用程序之前手动侧载:

adb install /path/to/android/sdk/extras/google/instantapps/tools/apks/release/devman.apk

答案 3 :(得分:0)

在我的情况下(在模拟器中)选项设置 - > Google - >即时应用已停用 我手动启用它,然后它工作正常。

相关问题