【问题标题】:Android deep links legacy failure issueAndroid 深度链接遗留故障问题
【发布时间】:2022-03-29 16:29:48
【问题描述】:

我们需要验证应用深层链接才能在 android 12 上运行。我添加了assetlinks.json 并在意图过滤器中添加了自动验证,并根据要求拥有主机。

[
  {
    "relation": [
      "delegate_permission/common.get_login_creds"
    ],
    "target": {
      "namespace": "web",
      "site": "https://proofing.example.com"
    }
  },
  {
    "relation": [
      "delegate_permission/common.get_login_creds"
    ],
    "target": {
      "namespace": "web",
      "site": "https://www.example.com"
    }
  },
  {
    "relation": [
      "delegate_permission/common.get_login_creds",
      "delegate_permission/common.handle_all_urls"
    ],
    "target": {
      "namespace": "android_app",
      "package_name": “packangename,
      "sha256_cert_fingerprints": [
        “{Added cert fingerpinters here}”
      ]
    }
  }
]

当我通过以下命令进行测试时:“adb shell pm get-app-links package name”,我收到 legacy_faiulre 错误。

如果有人知道这件事,请告诉我。

【问题讨论】:

标签: android kotlin android-12 android-deep-link


【解决方案1】:

确保sha256_cert_fingerprints 正确无误。解决了我的问题。

【讨论】:

    【解决方案2】:

    Deep-linksAndroid 11 或之前工作,但在Android 12 不是。找到下面的链接,对你有帮助!

    https://*.com/a/71247712/12313041

    【讨论】:

    • 虽然此链接可能会回答问题,但最好在此处包含答案的基本部分并提供链接以供参考。如果链接页面发生更改,仅链接答案可能会失效。 - From Review