LoginSignup
0
0

Firebase Authentication Googleサインイン時に出たエラー:PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 16: , null, null)

Last updated at Posted at 2023-11-08

問題の状況

flutterでFirebaseのAuthenticationを使ってGoogleサインインできる機能を実装しようとしたら
PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 16: , null, null)
というエラーが表示される。
設定したSHA1に間違いがないか確認している。
エミュレータ上のデバイスでは動かないのに実機だとなぜか動作する。

対処法

恐らく、デバイスのGoogle Play servicesのバージョンが問題でした。
エミュレータにPlay Storeがインストールされているデバイスを選択することで解決。
私の場合Pixel 4を選択したところ無事エミュレータでも動作しました。

device_select.png

終わりに

エラーの対処法は、Play Storeのあるデバイスに切り替えるだけったのに三日も対処に時間がかかりました。
同じエラーで悩んでいる方の助けになれば幸いです!

0
0
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
0
0