简体   繁体   中英

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:

在此处输入图片说明

So, what am I doing wrong here ?

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 在此处输入图片说明

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

在此处输入图片说明

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

在此处输入图片说明

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

在此处输入图片说明

copy the SHA1 key and use where you want.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM