【发布时间】:2017-07-21 15:30:40
【问题描述】:
这里我开发了一款应用,Android Instant App 文档支持 Instant App。
App 和 Instant App 的版本代码相同,App 发布为公测版,Instant App 发布为预发布版。
它在我的设备上运行良好,可以通过谷歌应用、Chrome、电子邮件中的动态链接启动,但从几个小时前开始它总是跳转到相关网站。
我已清除 Google Play Service 和 Google Play Service for Instant App 的缓存数据和应用数据,重新登录我的 google 帐户,重新启用 Instant App,清除 Chrome 历史记录和缓存数据,重新登录我的Chrome 中的谷歌帐户。重新检查了assetslink.json,重新检查了manifest文件中的urlsintent,都和以前的版本一样,除了版本代码build.gradle没有任何变化。
我测试了wish,它的instant app可以在Chrome中打开,但是我的Instant App打不开,只显示网站,甚至用adb命令启动。
adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d https://xxxx.xxxx.com/index.html -n "com.google.android.instantapps.supervisor/.UrlHandler"
只有调试版本可以在 WH Dev Manager 运行时访问。
开发环境
- Android 设备为 Pixel Android 7.1.2
- Android Studio 是 3.0
- Canary 7 Build #AI-171.4182969,于 2017 年 7 月 15 日构建
- JRE:1.8.0_152-release-884-b01 x86_64
- JVM:JetBrains s.r.o 的 OpenJDK 64 位服务器 VM
- Mac OS X 10.11.6
网站托管在 Amazon S3 上,域名由 CloudFront 处理。
接下来我应该检查什么?
新:
仔细查看logcat输出后,发现如下一行
07-21 11:32:24.650 20801-20801/? W/cr_GoogleAuth:
Bad URI 'intent://xs4js.app.goo.gl/qL6j#Intent;package=com.google.android.gms;scheme=https;S.browser_fallback_url=https://xxxx.xxxx.com/index.html;end;'
更新:
在 logcat 中找到另一个信息。
07-23 20:35:51.456 1977-27698/? W/Conscrypt: Could not set socket write timeout:
07-23 20:35:51.458 1977-27698/? W/Conscrypt:
java.lang.reflect.Method.invoke(Native Method)
07-23 20:35:51.458 1977-27698/? W/Conscrypt: wrp.a(:com.google.android.gms:58)
07-23 20:35:52.651 26256-27085/? I/cr_omaha: Attempting to schedule next job for: Mon Jul 24 01:06:11 PDT 2017
07-23 20:35:52.665 26256-26256/? I/cr_omaha: Scheduled using JobService
07-23 20:35:52.665 26256-26256/? E/cr_BkgrdTaskJS: Tried finishing non-current BackgroundTask.
07-23 20:35:52.736 26916-26916/? E/OptInDirector: Instant app launch failed for an unknown reason (getInstantAppPreLaunchInfo failed - check previous logcat)
07-23 20:35:52.736 26916-26916/? E/Supervisor: Opt-in aborted.
07-23 20:35:52.737 26916-26916/? W/Supervisor: Fallback handler not found with CATEGORY_BROWSABLE
【问题讨论】:
-
请尝试以下操作: 1. Google > Instant Apps > 关闭“关闭”(右上角)| 2. 卸载⸢Google Play services for Instant Apps⸥(如果安装了已安装的应用,也要卸载)| 3. 重新运行您的免安装应用
-
已尝试重新安装 Google Play Service for Instant Apps,但仍然无法正常工作。
-
卸载前的一个关键步骤是
1. Google > Instant Apps > turn "off" (top-right),你这样做了吗? -
是的,当然。已经尝试过这样的步骤。 1.删除【Google Play服务】中的所有应用数据。 2. 删除【谷歌游戏服务】中的所有应用数据。 3. 删除【Google Play Service for Instant Apps】中的所有应用数据。 4. 关闭【免安装应用】。 5. 卸载【Google Play Service for Instant Apps】。 6.重新启用[Instant Apps]它将重新安装[Google Play Service for Instant Apps] 7.运行Debug Instant App。 8. 清除调试即时应用数据。 9. 从通知中卸载 [Install Apps Dev Manager]。 10.在[Google]中启动动态链接,但还是有问题。我会附上完整的日志。
-
@TWL 在此处登录 s3.amazonaws.com/sanguo-instantapp/logs/instantapplog001 s3.amazonaws.com/sanguo-instantapp/logs/instantlog002 关于环境的另一件事,我在设备上使用 VPN 登录美国 Google Play 帐户,因为 Instant Apps 仅在多个地区可用,只需确保它正在工作。
标签: android android-instant-apps