How to create keystore file, get SHA1 Certificate, Hash key and change package name in Flutter

In this video, I was showing about flutter for android with all of these the main 5 topics:
1. Create Flutter project
2. Change package name and application name using with rename package
3. Generate keystore .jks file using with command line
4. Export SHA1 Certificate key using with command line
5. Generate Hash key

1. Create Flutter project

Details:

- First, created new folder in Drive C using with command line
- Second, created flutter project in this new folder using with with command line
(Tip; show how to create new flutter project in File, New, using mouse)

2. Change package name and application name

Details:

- First, install rename package by visiting pub.dev official website
- Second, explain about how to set the name of package name, referred with two websites: Google firebase and Oracle websites
- Third, change package name and application name

Code: 
pub global run rename --bundleId com.LinNaingOo.Exercise
pub global run rename --appname "My Exercise"



3. Generate keystore file with the format of .jks

Details:
- using with this comment line

keytool -genkey -v -keystore C:\LinNaingOo\exercise\exercise.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias myexercise

(noted: if you are facing the errors; please go to run flutter doctor -v and take java binary address and go to terminal without java in behind of bin\ (bin\java to bin) and the paste above code.


4. Export SHA1 certificate key

Details:

- Before exporting SHA1 certificate key, go to add some code by following from official website for signing release file .aab playstore.

- Export SHA1 certificate key method was showing at 20:22.
(you can skip to 20:22 if you don't want to know how to signing for release .aab)

Code: 
keytool -list -v -keystore  C:\LinNaingOo\exercise\exercise.jks -alias myexercise -storepass 123abcdM-/: -keypass 123abcdM-/:

5. Generate Hash key

Details:

- First, Go to download openssl folder from this website:
https://code.google.com/archive/p/openssl-for-windows/downloads?authuser=1

- Second, run the following code

Code:
keytool -exportcert -alias myexercise -keystore C:\LinNaingOo\exercise\exercise.jks | openssl sha1 -binary | openssl base64


Thank you so much.
Kindly Regards,
Nai with big smile :)


Full Version:

Post a Comment

0 Comments

Close Menu