简体   繁体   中英

Instant App - Digital Asset Links Protocol

Whenever I tried to upload my instant app apks to Play store, it gives the following error :

  • Your site 'www.mywebsitename.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.

However, whenever I execute https://developers.google.com/digital-asset-links/tools/generator , it gives success for associating with my app and web site. Any idea why am I getting this error? What may cause this?

Thanks for help in advance.

Please check whether Google Play App Signing is enable on Google Play Console. If Google Play App Signing is enable, Google Play Console will replace your app key with release key. And the key you set on Android Studio is treated as upload key. So, you need to modify your assetlinks.json with release key.

This happened to me when I had generated an assetlinks.json file from my debug keys, rather than the release keys. It shows up as verified in Android Studio, then fails on the server. 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. 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. 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"). 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.

Please check if your website asset link file is not behind some form of authentication, internal IP, or blocked by firewall. Play Store Developer Console can not access the digital asset link file if it is not publicly accessible.

That said, please double check if https://www.mywebsitename.com/.well-known/assetlinks.json is accessible from external network (switch to a public wifi and verify the json file can load properly).

As Jarrod said in a comment, if all else fails then discard the staged release and re-upload the APK. Just now worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM