Android, Generate Digital Asset Link: keystore file for signing the app

8.6k views Asked by At

I implemented universal linking for my Android app. Everything works fine so far. I click on a universal link and will be immediately redirected to the app. However, I have always used debug for the Digital Asset Links. For the release I need the signing config or the keystore file.

enter image description here

To sign my app I always use a created xxxx.jks file. If I specify this, an error occurs: Error occured while trying to get the SHA-256 fingerprint (See screenshot).

enter image description here

The error is very meaningless. That's why I'm a little confused. Do I use the right file? How do I get a better error description? I always use this file to sign my app for a new release. That doesn't cause any problems.

I already took the SHA-256 fingerprint from the App signature certificate from the Play Console. This doesn't really work properly. Whenever you click on my universal link, the app asks: Should the link be opened with Chrome or with 'MyApp'?

I am grateful for input.

4

There are 4 answers

6
kuzdu On BEST ANSWER

Okay, the solution was simple. I just take the SHA256 from the google play console. This one you have to put in your assetlinks.json

Then I build a public beta and it works like expected.

enter image description here

0
Paul Moers On

I had the same issue when trying to set up an App Link, following the steps from https://developer.android.com/studio/write/app-link-indexing.

For the 'Associate your app with your website' steps I created a signing config, with keystore file using the command line keytool. But this didn't work, clicking Generate Digital Asset Links file gave "An error occurred while trying to get the SHA-256 fingerprint of the keystore file. Please make sure your keystore file is correct.". I doublechecked my keystore file and tried again, but the issue remained.

The fix is to use Android Studio's New Key Store wizard and use that keystore file instead. You can open the wizard via Build > Generate Signed Bundle/APK... > APK > Next > below the 'Key store path' option click 'Create new ...'. See also https://developer.android.com/studio/publish/app-signing#generate-key.

0
Михаил Бритов On

You need generate Digital Asset Links with debuge signing config and replace SHA like in answer @kuzdu

0
nilsi On

Had the same issue and found out we don't need to use Android studios assets file generator anymore. It's available directly from the google play developer console as shown in the attached screenshot.

enter image description here