'Where do I get SHA-1 certificate fingerprint using flutter? (using flutter create --androidx ProjectName)
I want to make a simple login page using flutter, and using it with firebase. The first step when I created the project my code:
flutter create --androidx ProjectName
I write this on my IDE Terminal, and it was executed successfully. I can code normally until I have to regiter my project to firebase. I am stuck with getting SHA-1 fingerprint ceritificate in which I don't know where to find.
I have java and android studio installed. When I follow the instructions to code and use keytool at IDE Terminal:
keytool -list -v\
alias androiddebugkey -keystore ~/.android/debug.keystore
it said that alias is an illegal option. And also I can't find gradle tab at rightmost part of android studio window. This was the only thing that hinders my deveopment.
Link to tutorial: https://medium.com/flutter-community/flutter-implementing-google-sign-in-71888bca24ed
Solution 1:[1]
This sometimes occured when opening the flutter project using android studio, where the gradle tab does not appear at the rightside. To inspect SHA-1, MD5 or SHA-256:
- First you need to right-click at the gradlew at android folder, and choose open in terminal.
- In the directory type
./gradlew signingReport
- if success, it will show you the SHA-1.
Example:
> Task :app:signingReport
Variant: debug
Config: debug
Store: /Users/<your_user>/.android/debug.keystore
Alias: AndroidDebugKey
MD5: 23:..
SHA1: C5:...
SHA-256: 24:...
Valid until: diumenge, 10 / de desembre / 2051
----------
Variant: release
Config: release
Store: /Users/<your_user>/.../<your_flutte_folder>/android/app/android.keystore
Alias: <project_name>
MD5: 6C:...
SHA1: 9D:...
SHA-256: FA:...
Valid until: dijous, 31 / d’agost / 2045
----------
...
IF there is an error around starting the daemon, follow the following steps:
- Go to android folder and search for gradle.properties.
- Find the
org.gradle.jvmargs=-Xmx1536M
and change the 1536 to 1024. - Restart the
gradlew signingReport
process and it should run.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Guillem Puche |