Android Instant App深度链接失效求助:链接仍跳转浏览器
Google Play深度链接无法触发Android Instant App的排查问题
我们的Android Instant App在Google Play中无法被深度链接触发,点击链接仍会跳转至Chrome。以下是已完成的配置和当前疑问:
已完成的配置与环境信息
模块依赖结构
unrelated_mod-->| unrelated_mod-->| instant_mod---->| app |-> data_module |-> server_module
配置细节
- 已按官方指南将单体应用重构为包含功能模块和instant模块的结构,重构后满足生产环境Instant App大小要求,但暂未找到检测最终Instant App大小的方法
- 主app模块的
AndroidManifest.xml已配置android:targetSandboxVersion="2"及<dist:module dist:instant="true" /> - instant模块的manifest配置:
<dist:module dist:instant="true" dist:title="@string/..."> <dist:delivery> <dist:install-time /> </dist:delivery> <dist:fusing dist:include="true" /> </dist:module>
- 深度链接在完整应用安装状态下可正常工作;instant模块的Activity已配置http/https scheme及
autoVerify="true",Google服务可识别assetlinks.json - 版本号配置符合要求:主app模块
versionCode设为500000 + 实际版本号,instant模块设为实际版本号 - Google Play后台状态:
- Google Play Instant状态为Active
- 发布概览包含三个条目:Closed testing - Alpha旧版本、Internal Testing待排查版本、状态为Draft的"Internal Testing (Instant apps)"未知轨道(无相关文档,上传构建包时报错)
- 已添加正确的测试人员邮箱,完成App签名配置并在
assetlinks.json中添加对应指纹
排查方向
- Instant模块深度链接配置校验:确认instant模块Activity的
<intent-filter>与完整应用的配置完全一致,包括host、pathPattern等参数,确保autoVerify="true"已正确添加到该intent-filter内 - Instant App发布轨道状态:后台的"Internal Testing (Instant apps)" Draft轨道是Instant专属测试轨道,需确保该轨道的构建包已完成上传并发布(而非仅停留在Draft状态);完整应用与Instant App需对应不同测试轨道,上传时要选择Instant专属轨道提交
- Instant App大小验证:可通过Android Studio生成Instant App的bundle后,使用
bundletool工具的validate命令检测包大小,命令示例:bundletool validate --bundle=your_instant_app.aab - 设备兼容性检查:确认测试设备已开启Google Play Instant功能(路径:设置 > Google > Google Play Instant),且系统版本不低于Android 8.0
- 深度链接直接测试:使用
adb shell am start -W -a android.intent.action.VIEW -d "你的深度链接"命令直接测试,排除第三方应用(如Google Chat)的跳转干扰 - assetlinks.json关联验证:再次确认
assetlinks.json放置在域名的.well-known目录下,文件中的签名指纹与Google Play后台App签名的指纹完全一致(含大小写、格式),同时确保instant模块的packageName已正确添加到文件中
内容的提问来源于stack exchange,提问作者Dylan Knight
相关产品推荐
相关产品推荐

