Generate SHA-1 for Flutter app

2020-02-02 05:56发布

I'm trying to generate a SHA-1 for a Flutter app, for Android studio to support Google Sign in, but I don't know how to do that, I saw some posts that indicate to run a command, but there I need a jks file I guess, and flutter doesn't create that.

Could someone help me?

标签: dart flutter
8条回答
疯言疯语
2楼-- · 2020-02-02 06:51

Check this Authenticating Your Client  |  Google APIs for Android

To get the debug certificate fingerprint:

for Mac or Linux

keytool -list -v \ -alias androiddebugkey -keystore ~/.android/debug.keystore

for Windows

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

The default password for the debug keystore is android.

The keytool then prints the fingerprint to the terminal.

查看更多
男人必须洒脱
3楼-- · 2020-02-02 06:51

This is the easiest way-

  1. Open Android Studio

  2. Open Project

  3. Reveal android folder

  4. Right click gradlew file and select Open in Terminal -

Open in Terminal

  1. Go to the terminal view and paste - gradlew signingReport

Paste

  1. Press enter and scroll to Variant debug to get the SHA1 key

Scroll to key

  1. Copy and use wherever you need it, Good Luck!
查看更多
登录 后发表回答