How to generate keytool for android release and debug build

Intro of keytool –

Keytool is a key and certificate management tool that is used to manipulate Keystores, Keystore is a container for authorization certificates or public key certificates, and is often used for encryption, authentication.
The Keytool is a command line tool which can generate public key / private key pairs and store them in a KeyStore, for generating SHA1 certificate we must needed keytool, So let’s the “How to generate keytool for android release and debug build“.

https://www.itechinsiders.com/ - react native keytool
https://www.itechinsiders.com/ – react native keytool

There are two types of keytool, one for debug mode and another for release mode.

For Debug mode:

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -
 storepass android -keypass android

for Release mode:

keytool -list -v -keystore {keystore_name} -alias {alias_name}

example:

keytool -list -v -keystore C:\Users\MG\Desktop\test.jks(keystore path location) -alias test

Result is like above image where you find SHA1 and SHA256.

Some of common issues is:

Issue 1 –

‘keytool’ is not recognized as an internal or external command.

Solutions – first you need to go to the path where your bin is located, If you do that, it’s going to be looking for the keystore path which may like C:\Program Files\Java\jdk1.6.0_21\bin\ go to this path and run the keytool command.

Issue 2 –

If you signin with google it’s working but whenever you create release build it not working.

Solutions –

It’s just because of SHA1 key is not add into your firebase console then please generate it by following above steps.

and you can find my post on medium as well click here please follow me on medium as well.

So the topic “How to generate keytool for android release and debug build” is completed, “you can find the next issue list here.

And if any other query/issue then please comment.

Happy Coding Guyz.


Related Post