Reputation: 2679
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
Upvotes: 9
Views: 20421
Reputation: 1
you should Install Java 8 or 11 and then enter in android folder
cd android
./gradlew clean
./gradlew signingReport
Upvotes: 0
Reputation: 1
Use this command below if you are using Windows OS. Make sure to replace the username within the path with your username where android studio is installed. You could easily replace the C:\Users\username with the path of your user account where Android studio is installed.
keytool -list -v -keystore "C:\Users\username\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
Upvotes: -1
Reputation: 276
I had the same problem, to get the SHA-1 there are two ways:
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.
Upvotes: 26
Reputation: 55
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
Upvotes: 1
Reputation: 4312
Authenticating Your Client documents how to obtain your SHA-1 with keytool
.
Upvotes: 1
Reputation: 7979
Are you saying that the following option (view Gradle panel) is not at all available?
Upvotes: 3