【发布时间】:2019-11-29 19:37:08
【问题描述】:
我已经使用 My Local APK 成功实现了 Android 应用链接,并且它可以正常工作。当我在 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
我的 robots.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"] }
}]
{
"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] 等是占位符。
那么...如何强制 Google 读取我当前的assetlinks.json 而不是使用旧的缓存版本?
【问题讨论】:
-
当你部署文件时它会改变;)
-
你有没有得到这个答案?我现在自己也面临同样的问题
-
各位有没有找到解决办法,我也遇到了同样的问题,有没有办法强制清除缓存?
-
有没有人找到任何解决方案?我认为等待 8 天更改部署是不可接受的。