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
相关产品推荐
相关产品推荐

