I want to use assetlinks.json
for appindexing.
I am supposed to use a SHA256 fingerprint
, but when I print out the signingReport
in Android Studio, I only have SHA1.
Can I use SHA1
? If not, how can I get a SHA256 signed app?
Using Manish Jain's answer, I have managed to list only the debug keys. If I put my actual keystore path and jks file in the path:
keytool -list -v -keystore "C:\Users\myself\Keystores\android.jks" -alias mykey -storepass 1password -keypass 2password
A different set of keys come up, which I assume would be the release key set.
The BIG QUESTION is why Android Studio only lists the debug keys when I print out the signingReport
from Gradle and why it says Variant: releaseUnitTest, Config: none
? Any idea?
You can get SHA256
by using keytool
using command prompt (windows).
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
For Mac users:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
If you have any special characters in your password, you may need to wrap the password in single quotes.
There is a much simpler and updated method to find it, comes from this answer.
You will find your SHA-256 Fingerprint there.
As @quent commented, change your run configuration in the main toolbar to run the debug configuration again.
Go to the root directory of the project from the terminal and run the below command
./gradlew signingReport
You will get SHA-1, SHA-256, and other details
You can get it from the Google Play Console (https://play.google.com/apps/publish). Follow these steps:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With