4

I'm trying to retrieve the SHA-1 Fingerprint Certificate for my Flutter Project. This can usually be done going into the Gradle Panel on the right side in Android Studio and clicking on signingReport.

The problem is however, in Flutter, it doesn't show the Gradle Panel at all and after an hour of searching, I still couldn't find a way to get that panel to show.

I tried the Keytool way, but it tells me there's no such command in the Command Prompt. How do I get the SHA-1 Certificate for my flutter project? I need it for signing in my Flutter Project with Firebase Auth.

I've also searched in the Firebase Documentation, there is no documentation of how to find the SHA-1 in flutter. It simply says that SHA-1 is required for using Firebase Auth.

Related issue https://github.com/flutter/flutter/issues/24776

Günter Zöchbauer
  • 490,478
  • 163
  • 1,733
  • 1,404
Adifyr
  • 2,350
  • 6
  • 35
  • 55

4 Answers4

3

Are you saying that the following option (view Gradle panel) is not at all available?

gradle enable

Jake Lee
  • 5,837
  • 7
  • 39
  • 73
  • 1
    Not in my flutter project, no. Do you have a flutter project on or a regular Android project? Because I can't see any flutter options in that menu, which would normally be there when working on a flutter project. – Adifyr Nov 27 '18 at 15:06
2

I had the same problem, to get the SHA-1 there are two ways:

  1. Using Keytool (didn't work with me)
  2. Using Gradle's Signing Report , which I used ,FIrst on terminal go to android folder with command:
cd android               

and the following command to get the report:

./gradlew signingReport

then it will show the signingReport which you can retrieve the SHA-1 from it.

enter image description here

  • Hi. Thanks! Your answer worked. It doesn't require the `chmod` command. Directly doing `./gradlew signingReport` when in the `/android` directory of the Flutter Project will work. – Adifyr Sep 11 '20 at 09:16
0

Authenticating Your Client documents how to obtain your SHA-1 with keytool.

Robert Claypool
  • 4,083
  • 9
  • 47
  • 59
0

Use the command from Authenticating Your Client with Command Prompt:

keytool -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore

If the command doesn't work, then include the path to keytool.exe. For me, that was C:\Program Files\Java\jdk-12.0.2\bin\keytool.exe. So the command I used was as follows:

"C:\Program Files\Java\jdk-12.0.2\bin\keytool.exe" -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
Tall Paul
  • 31
  • 7