You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android Studio中GoogleSignInClient无法找到的问题及解决

Firebase谷歌身份验证中找不到GoogleSignInClient的解决方法

在Android项目中尝试使用Firebase谷歌身份验证时,遇到GoogleSignInClient类无法识别的问题。此前已通过Firebase成功实现邮箱密码方式的用户创建与登录,Firebase核心功能正常,本次为首次尝试谷歌登录功能。

相关代码片段

MainActivity中的变量声明

private lateinit var googleSignInClient: GoogleSignInClient

应用级Build Gradle的依赖配置

implementation platform('com.google.firebase:firebase-bom:31.1.0')
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'com.google.android.gms:play-services-auth:20.4.0'

问题解决方法

更新应用级build.gradle文件中com.google.gms.google-services插件的版本后,问题得到解决。

内容的提问来源于stack exchange,提问作者Antony Lajes

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.08 23:15:39