3.4 Generate Release Certificate

To generate a release certificate, You have to generate a Keystore file. To generate a Keystore file, run this command below from the root of your project directory.
keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
keytool -genkey -v -keystore c:\Users\USER_NAME\upload-keystore.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias upload
  • Enter your details and remember the password. After this, you will get an upload-keystore.jks Keystore file.
  • Locate this file and move the file into the android/app folder and copy the path by right-clicking on the upload-keystore.jks file.
  • Then go to the android/​ file and replace the path of your Keystore file. Then also replace the ​password​ which you have inputted to generate the Keystore file.
Now you can generate a release certificate, To do that,
  • Run with replacing your alias_name and keystore_location.
keytool -list -v -keystore keystore_location -alias alias_name
Your alias_name is upload and keystore_location is the path(directory) of the upload-keystore.jks file.
  • After that, you will get a SHA1 code. Copy that code and add it to your Firebase Console > Project Settings > Android, where you previously added a debug SHA1 code.