Skip to content Skip to sidebar Skip to footer

Get Key Hash For Release

I have been trying to get my key hash for my release to work for hours now, and I must be doing something wrong because I have searched and tried so many different things, Now lets

Solution 1:

From reading your comment and seeing what you have so far, you're trying to get the key hash for Facebook, right?

First, make sure that you have signed your apk (which is your app). You can sign your apk in Android Studio by Build -> "Generate Signed APK...". When you sign your apk, you create your keystore and an alias for that keystore. I think your are confusing "keystore" with the "apk".

Also, you have to include your alias and keystore passwords in your command.

It should look like this:

keytool -exportcert -keystore keystore_file -alias alias_name -storepass keystorepassword -keypass aliaspassword | openssl sha1 -binary | openssl base64

Also, make sure that you are creating a "Release Build", which can be selected from the Build Variants menu.

Solution 2:

Generate a key store

$ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Sign an apk.

$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name

Post a Comment for "Get Key Hash For Release"