I'm trying to generate a SHA-1 for a Flutter app, for Android studio to support Google Sign in, but I don't know how to do that, I saw some posts that indicate to run a command, but there I need a jks file I guess, and flutter doesn't create that.
Could someone help me?
How get Release and Debug keys: one more the easiest way (May 2019). All actions are inside Android Studio.
- Select android/app/build.gradle file and on the right top corner click "Open for Editing in Android Studio"
![](https://www.manongdao.com/static/images/pcload.jpg)
- Open Gradle panel and double click on "SigninReport"
![](https://www.manongdao.com/static/images/pcload.jpg)
- That's it! If you use Firebase - add these 2 keys there. You should add both keys, otherwise, without release key, Google login will not work on the devices.
![](https://www.manongdao.com/static/images/pcload.jpg)
You won't find a gradle window view in flutter project, so here is a solution for that.. In command prompt navigate to bin folder of jdk and run this command
keytool -list -v -keystore "C:\Users\yourusernamehere\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
change user name in path
I partially agree with Rishab answer, but what we can do is
Navigate to Android folder inside project, there is gradlew file. so we can use this like :
gradlew signingReport
in Mac
./gradlew signingReport
in my case i use it like :
D:\flutter\flutter_app\android>gradlew signingReport
Project Architecture is :
There are many ways you can do this, this is the easiest way I found.
Step 1: Open Project in Android Studio.
Step 2:
Step 3: Find your SHA1 key in the signing report below in your android studio.
Hope it helped you..!
You can generate it even from terminal. Following is for the release mode:
keytool -list -v -keystore keystore_location -alias alias_name
example :
keytool -list -v -keystore /home/user/key.jks -alias alias_name
you can do the same on VSCode, open the folder that contain gradlew for linux and gradlew.bat for windows and run ./gradlew signingReport for linux and run gradlew signingReport for windows
![](https://www.manongdao.com/static/images/pcload.jpg)
Check this Authenticating Your Client | Google APIs for Android
To get the debug certificate fingerprint:
for Mac or Linux
keytool -list -v \ -alias androiddebugkey -keystore ~/.android/debug.keystore
for Windows
keytool -list -v \ -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
The default password for the debug keystore is android.
The keytool then prints the fingerprint to the terminal.