Android App Links失效排查:全面调试后仍无法跳转至应用
Android Expo应用Deep Links自动验证失效排查
我正在为一款基于React Native开发、Expo打包的Android应用实现Deep Links。当前问题:用户点击应用关联域名下的链接时,会打开网页浏览器而非应用。此前Deep Links可正常工作,但在某一未知时间点完全失效。用户可在Android设置中手动关联链接,但这对终端用户并不友好。
Expo项目app.config.js相关配置
intentFilters: [ { action: 'VIEW', autoVerify: true, data: [ { scheme: 'https', host: 'centrito.co', pathPrefix: '/products', }, ], category: ['BROWSABLE', 'DEFAULT'], }, { action: 'VIEW', autoVerify: true, data: [ { scheme: 'https', host: 'www.centrito.co', pathPrefix: '/products', }, ], category: ['BROWSABLE', 'DEFAULT'], }, { action: 'VIEW', autoVerify: true, data: [ { scheme: 'https', host: 'centrito.co', pathPrefix: '/account/orders', }, ], category: ['BROWSABLE', 'DEFAULT'], }, { action: 'VIEW', autoVerify: true, data: [ { scheme: 'https', host: 'www.centrito.co', pathPrefix: '/account/orders', }, ], category: ['BROWSABLE', 'DEFAULT'], }, ],
assetlinks.json内容
[ { "relation": ["delegate_permission/common.handle_all_urls"], "target": { "namespace": "android_app", "package_name": "com.centrito.app", "sha256_cert_fingerprints": ["4F:7A:AD:EC:06:9C:BA:A3:FD:A6:96:77:7B:8C:6C:C8:17:95:09:C0:59:8D:83:A3:F4:1A:B9:5E:C9:6F:CA:FD"] } } ]
已完成的验证
- 谷歌Digital Asset Links工具显示应用与域名已成功关联
- 执行
curl -I请求域名下的/.well-known/assetlinks.json,返回状态码200,服务器配置无问题
调试发现的异常
- 安装应用时执行
adb logcat,无自动验证相关日志 - 执行
adb shell pm verify-app-links --re-verify com.centrito.app和adb shell pm get-app-links com.centrito.app命令,控制台无输出
推测自动验证流程未触发,请问还有哪些原因可能导致该问题?是否可能是谷歌方面的问题?
内容的提问来源于stack exchange,提问作者Fernando Avalos
相关产品推荐
相关产品推荐

