[英]how to link website with digital asset link protocol for Instant app?
I am stuck from last one week, i am not able to upload instant app apk. 我被困在过去的一个星期,我无法上传即时应用apk。 I am getitng "Your site 'sptechinfo.000webhostapp.com' has not been linked through the Digital Assets Link protocol to your app. Please link your site through the Digital Assets Link protocol to your app"
我正在获取“您的站点'sptechinfo.000webhostapp.com'尚未通过Digital Assets Link协议链接到您的应用程序。请通过Digital Assets Link协议将您的网站链接到您的应用程序”
I already added assetlink.json AssetLink.json but still am gettign same error on playstore. 我已经添加了assetlink.json AssetLink.json,但在playstore上仍然出现相同的错误。
I verified link from here https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=http://sptechinfo.000webhostapp.com&relation=delegate_permission/common.handle_all_urls but getting same error. 我从此处https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=http://sptechinfo.000webhostapp.com&relation=delegate_permission/common.handle_all_urls验证了链接,但出现了同样的错误。
this is my asset_statements in string.xml file [{\\n \\"relation\\": [\\"delegate_permission/common.handle_all_urls\\"],\\n \\"target\\": {\\n \\"namespace\\": \\"web\\",\\n \\"site\\": \\" http://sptechinfo.000webhostapp.com \\",\\n }\\n}] 这是我在string.xml文件中的asset_statements。[{\\ n \\“ relation \\”:[\\“ delegate_permission / common.handle_all_urls \\”],\\ n \\“ target \\”:{\\ n \\“ namespace \\”:\\“ web \\“,\\ n \\” site \\“:\\” http://sptechinfo.000webhostapp.com \\“,\\ n} \\ n}]
Please anyone help me to solve this. 请任何人帮我解决这个问题。
Ref : Instant App - Digital Asset Links Protocol 参考: Instant App-数字资产链接协议
This happened to me when I had generated an assetlinks.json file from my debug keys, rather than the release keys. 当我从调试键而不是释放键生成assetlinks.json文件时,这发生了。 It shows up as verified in Android Studio, then fails on the server.
它显示为在Android Studio中已验证,然后在服务器上失败。 Double check that the signing config is correct for your asset links file, and that the fingerprint in the file matches the SHA256 fingerprint of your release key.
仔细检查签名配置对您的资产链接文件是否正确,并且文件中的指纹与释放密钥的SHA256指纹匹配。 You can get your release key's fingerprint by running
您可以通过运行获取释放密钥的指纹
keytool -list -v -keystore ~/my_keystore.jks
Another cause can be if you've enabled Play signing. 另一个原因可能是您启用了Play签名。 In that case, you have to use the fingerprint provided in your developer console, not the one for the key you signed the APK with locally (the local one is called your "upload key").
在这种情况下,您必须使用开发人员控制台中提供的指纹,而不是您在本地使用APK签名的密钥的指纹(本地指纹称为“上传密钥”)。 This isn't obvious in Android Studio at all, since its asset link file generator doesn't give you an option to put in a custom fingerprint.
这一点在Android Studio中一点都不明显,因为它的资产链接文件生成器无法为您提供自定义指纹的选项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.