首页 > 解决方案 > 为什么应用链接在 Android 中不起作用?

问题描述

应用程序链接设置中的所有内容似乎都不错。但是,验证仍然失败。

我做了以下清单

  1. assetlinks.json 是正确的,并且它没有任何重定向(301 和 302)托管。
  2. 该网站具有由Digicert颁发的有效 SSL 证书
  3. 语句列表测试器中测试了语句列表,看起来不错。
  4. Android清单中的链接配置是正确的。(我有另外两个域支持,验证那些链接都成功)

附上系统验证日志(列出的域和包不是原始的)

2020-07-21 21:07:46.791 2423-5863/com.google.android.gms I/IntentFilterIntentOp: Verifying IntentFilter. verificationId:0 scheme:"https" hosts:"mycompany.branch.app mycompany.branch.link universal.mycompany.com" package:"com.app.mycompany".
2020-07-21 21:07:49.263 2423-5863/com.google.android.gms I/IntentFilterIntentOp: Verification 0 complete. Success:false. Failed hosts:universal.mycompany.com.

还有什么需要检查的吗?请分享你的想法。有什么方法可以获取 domaing 验证失败的原因吗?

编辑 assetlink.json文件托管有一些问题我已经用https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://universal.mycompany.com&relation=delegate_permission检查了它/common.handle_all_urls

其返回超时失败:

{
 "maxAge": "599.999999813s",
 "debugString": "********************* ERRORS *********************\n* Error: 
deadline_exceeded: Timeout occurred while fetching Web statements from 
https://universal.mycompany.com./.well-known/assetlinks.json (which is 
equivalent to 'https://universal.mycompany.com/.well-known/assetlinks.json') 
 using download from the web (ID 1).\n********************* INFO MESSAGES 
 *********************\n* Info: No statements were found that match your 
query\n"
}

Edit2:数字资产链接现在开始正确返回语句,但该主机的验证仍然失败。

添加响应头键:

在此处输入图像描述

标签: androiddeep-linkingandroid-app-links

解决方案


推荐阅读