Nemus
Nemus

Reputation: 3993

Get SHA-1 for Android Firebase

I'm trying to get SHA-1 certificate for my Android Firebase project, following this instructions https://developers.google.com/android/guides/client-auth. When I enter this command in my cmd:

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

I supposed to be asked to enter password, where I should enter android. But I am getting this:

enter image description here

So, what am I doing wrong here ?

Upvotes: 2

Views: 8716

Answers (2)

Al Walid Ashik
Al Walid Ashik

Reputation: 1779

There is another way to get SHA key for firebase project using android studio. follow this below instructions

1. See Android Studio right panel, you'll find GRADLE tab there like this enter image description here

2.Now Click on Gradle and you'll get this

enter image description here

3.You'll find your app name there.If not hit the refresh icon top-left corner.

enter image description here

click on your app name and go like this App Name > Tasks > android > signing report

Double click on signing report and you'll find your ap SHA-1 key in your RUN at bottom of the android studio like this

enter image description here

copy the SHA1 key and use where you want.

Upvotes: 13

Awah Teh
Awah Teh

Reputation: 1367

The issue is the slash (\) in your command. Make sure it is all on one line and remove any slashes (\). Also keep in mind that the command prompt interprets commands on a single line, so do not spread the command across multiple lines as it will treat everything on a new line as a different command. Put everything on one line.

Upvotes: 6

Related Questions