11
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

firebaseのエラー"Unhandled Exception: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null)"の解決策

Last updated at Posted at 2020-11-29

#firebaseを使ったgoogle認証
flutterでfirebaseauthを使ったgoogle認証を実装しようとしたら、
android環境で以下のようなエラーがでた。

E/flutter ( 4434): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] 
Unhandled Exception:PlatformException(sign_in_failed,com.google.android.gms.common.api.ApiException: 10: , null, null)

色々ググってみたら、fingerprintを登録すればいいと書いてあるので、
https://developers.google.com/android/guides/client-auth
の言う通りに下記を実行したけどうまくいかない、、、

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

#最終的な解決策
①android>gradle下にあるgradlewを右クリックして「Open in Terminal」を実行

gradlew.png

②新しくターミナルが立ち上がるので下記を実行

./gradlew signingReport

そうするとSHA1とSHA256でのキーが表示される。
それらをfirebaseの設定の「フィンガープリントを追加」で追記する。
fingerprint.png

11
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?