2

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 ?

2
  • 3
    it's the \ causing problems, remove that and type it on one line Aug 3, 2017 at 21:41
  • Yes. That was the problem!
    – Nemus
    Aug 3, 2017 at 21:44

2 Answers 2

13

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.

1
  • This worked like a charm. The problem is that its not specific when they say to add the SHA-1 fingerprint for firebase of which file and from where exactly. Nov 19, 2020 at 21:13
6

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.