我已经成功地通过“我的本地APK”实现了Android应用链接,并且可以正常运行。当我在Google Play商店中发布相同的APK时,我发现我需要使用Google提供的指纹来更改/.well-known/assetlinks.json中的SHA 256指纹。所以我改变了。不幸的是,Google似乎保留了assetlinks.json的旧副本,这会破坏我的应用程序链接。
我已经检查了 https://developers.google.com/digital-asset-links/tools/generator并说 “未找到[您的应用]的应用深链接权限”
我已经检查了 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不同
P.S。 my-app-id,my-host,[my-site]等都是占位符。
那么...如何迫使Google读取我当前的assetlinks.json而不是使用旧的缓存版本?
答案 0 :(得分:0)
assetlinks.json文件也可能由Play服务缓存在您的 设备以及Google的服务器上,因此可能需要几天的时间 可以从您对Web服务器所做的任何更改中更新它们。和 SmartLock Chrome /应用登录共享需要下载您的APK 从Google的应用商店中获取。