侧面加载即时应用程序失败:读取包超时
Side loading instant app failed: Reading bundle timed out
无法使用 Android 模拟器,用于测试 Instant Apps!!每次我得到 "Side loading instant app failed: Reading bundle timed out."
我正在使用,Android Studio 3.0 Canary-5
模拟器:Nexus 5X 图像 运行 Android 6.0(API 级别 23),x86,Google APIs。 Google APIs Intel x86 Atom 系统映像(修订版 21)
Note: After updating Android Studio 3.0 (Canary-4 > Canary-5) &
Emulator system image from revision (20 > 21). I'm unable to run the
instant App through emulator. Always I'm getting the error message saying "Side loading instant app failed: Reading bundle timed 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 中找到了解决方案。这是 Studio canary-5 下的一个已知问题。
Reliability issue with instant app provisioning cache. If you manually
unprovision your device or emulator image for instant app development,
and then deploy the instant app from Android Studio, the deployment
will fail because Android Studio will not provision your
device/emulator image again. To workaround for this issue: Go into the
Run Configuration dialog and select the instantapp module on the
left-hand pane. Click the “Instant App Provision” task under “Before
launch:Gradle-aware Make, Instant App Provision” Click the edit (the
pencil icon) Check “Clear provisioned devices cache”
我在使用 compileSDK 26
和 targetSDK 26
构建项目时遇到了类似的错误。
回到 SDK 25
和 supportLibrary 25.4.0
解决了我的问题。
devman.apk
在 sdk/extras/google/instantapps/tools/apks/debug
文件夹下丢失。请在 运行 您的即时应用程序之前手动加载它:
adb install /path/to/android/sdk/extras/google/instantapps/tools/apks/release/devman.apk
该设备被认为是 "already provisioned for instant apps" 但它不是,可能是因为之前使用并修改了具有相同序列号(相同模拟器)的另一台设备,或者因为该设备被外部修改(不是 Android 工作室).
解决方法是在每次 运行 之前清除缓存:
InstantApp 运行 配置 -> 在 运行 任务之前 -> 为即时应用任务提供 -> 编辑 -> 清除配置的设备缓存。
在我的例子中,(在模拟器中)设置 -> Google -> Instant Apps 中的选项被禁用。
我手动启用了它,然后它工作正常。
无法使用 Android 模拟器,用于测试 Instant Apps!!每次我得到 "Side loading instant app failed: Reading bundle timed out."
我正在使用,Android Studio 3.0 Canary-5
模拟器:Nexus 5X 图像 运行 Android 6.0(API 级别 23),x86,Google APIs。 Google APIs Intel x86 Atom 系统映像(修订版 21)
Note: After updating Android Studio 3.0 (Canary-4 > Canary-5) & Emulator system image from revision (20 > 21). I'm unable to run the instant App through emulator. Always I'm getting the error message saying "Side loading instant app failed: Reading bundle timed 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 中找到了解决方案。这是 Studio canary-5 下的一个已知问题。
Reliability issue with instant app provisioning cache. If you manually unprovision your device or emulator image for instant app development, and then deploy the instant app from Android Studio, the deployment will fail because Android Studio will not provision your device/emulator image again. To workaround for this issue: Go into the Run Configuration dialog and select the instantapp module on the left-hand pane. Click the “Instant App Provision” task under “Before launch:Gradle-aware Make, Instant App Provision” Click the edit (the pencil icon) Check “Clear provisioned devices cache”
我在使用 compileSDK 26
和 targetSDK 26
构建项目时遇到了类似的错误。
回到 SDK 25
和 supportLibrary 25.4.0
解决了我的问题。
devman.apk
在 sdk/extras/google/instantapps/tools/apks/debug
文件夹下丢失。请在 运行 您的即时应用程序之前手动加载它:
adb install /path/to/android/sdk/extras/google/instantapps/tools/apks/release/devman.apk
该设备被认为是 "already provisioned for instant apps" 但它不是,可能是因为之前使用并修改了具有相同序列号(相同模拟器)的另一台设备,或者因为该设备被外部修改(不是 Android 工作室).
解决方法是在每次 运行 之前清除缓存: InstantApp 运行 配置 -> 在 运行 任务之前 -> 为即时应用任务提供 -> 编辑 -> 清除配置的设备缓存。
在我的例子中,(在模拟器中)设置 -> Google -> Instant Apps 中的选项被禁用。
我手动启用了它,然后它工作正常。