【发布时间】:2022-11-07 17:42:13
【问题描述】:
我想使用 Flutter 设置 Google 登录。
在 Firebase 中,我有用于调试和发布的 SHA。
当我启动应用程序时,我得到了按钮,它可以让我输入电子邮件,但是当我按下 enter 时,我得到了这个错误:
E/flutter (24342): [ERROR:flutter/runtime/dart_vm_initializer.cc(39)] 未处理异常:PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null)
我尝试了其他已发布的解决方案,但仍然出现此错误。我在模拟器和物理设备上都试过了。 文件 google-services.json 位于 app 文件夹中。
dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 google_sign_in: ^5.3.3 provider: ^6.0.3 firebase: ^9.0.3 firebase_core: ^1.17.1 firebase_auth: ^3.3.19 firebase_database: ^9.0.15我尝试在模拟器上本地运行该应用程序。 在许多解决方案中,我看到该应用程序已上传到谷歌。不能在本地测试吗?
【问题讨论】:
-
请编辑您的问题并包含minimal reproducible example
标签: android flutter google-signin