gpt4 book ai didi

android - 如何强制 Google 重新获取 .well-known/assetlinks.json 以修复我的 Android App Link 实现

转载 作者:行者123 更新时间:2023-12-03 09:39:54 30 4
gpt4 key购买 nike

我已经使用 My Local APK 成功实现了 Android App 链接,并且它可以工作。当我在 Google Play 商店中发布相同的 APK 时,我发现我需要使用 Google 提供的指纹更改/.well-known/assetlinks.json 中的 SHA 256 指纹。所以我改变了它。不幸的是,谷歌似乎保留了旧的assetlinks.json 副本,这会破坏我的应用程序链接。

我检查过
https://developers.google.com/digital-asset-links/tools/generator它说
“未找到 [your-app] 的应用深层链接权限”

我检查过
https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=[my-site]&relation=delegate_permission/common.handle_all_urls它向我展示了旧版本的assetlinks.json

我的机器人.txt

User-agent: *
Disallow:


我在目录/.well-known 中的 .htaccess 文件
Require all granted
RewriteEngine Off


<FilesMatch "\.(txt)$">
Require all granted
</FilesMatch>

<FilesMatch "\.(txt)$">
Allow from all
</FilesMatch>

我的assetlinks.json
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target" : { "namespace": "android_app", "package_name": "my-app-id",
"sha256_cert_fingerprints": ["my-sha-256-provided-by-gogole-play-console"] }
}]

https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=[my-site]&relation=delegate_permission/common.handle_all_urls 的结果
{
"statements": [
{
"source": {
"web": {
"site": "https://my-host."
}
},
"relation": "delegate_permission/common.handle_all_urls",
"target": {
"androidApp": {
"packageName": "my-app-id",
"certificate": {
"sha256Fingerprint": "the-old-sha-256-fingerprint"
}
}
}
}
],
"maxAge": "534347.929731888s",
"debugString": "********************* ERRORS *********************\nNone!\n********************* INFO MESSAGES *********************\n* Info: The following statements were considered when processing the request:\n\n---\nSource: Web asset with site https://my-host. (which is equivalent to 'https://my-host')\nRelation: delegate_permission/common.handle_all_urls\nTarget: Android app asset with package name my-app-id and certificate fingerprint the-old-sha-256 \nWhere this statement came from:\n Origin of the statement: Web asset with site https://my-host. (which is equivalent to 'https://my-host')\n Include directives followed (in order):\n \u003cNone\u003e\nMatches source query: Yes\nMatches relation query: Yes\nMatches target query: Yes\n\n--- End of statement list. ---\n\n\n"
}

the-old-sha-256 与我实际assetlinks.json 中的SHA 256 不同

附言my-app-id、my-host、[my-site] 等是占位符。

那么......如何强制谷歌读取我当前的assetlinks.json而不是使用旧的缓存版本?

最佳答案

  • 在您的情况下,谷歌缓存了您的 SHA256 并将采取最大限制
    八天更新您的 SHA256。只需更改网站名称
    在下面给出的 url 中,它将向您显示 google 拥有的 SHA256 key
    被缓存。

  • https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://www.your-website-name.com&relation=delegate_permission/common.handle_all_urls

    The assetlinks.json file may also be cached by Play Services on your device and also on Google’s servers, so it may take a few days for them to be updated from any changes you make to your web servers. And SmartLock chrome/app login sharing needs your APK to be downloaded from Google’s app store.

    关于android - 如何强制 Google 重新获取 .well-known/assetlinks.json 以修复我的 Android App Link 实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55510142/

    30 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com