【问题标题】:Error in Google sign auth谷歌签名认证错误
【发布时间】:2024-05-22 21:25:01
【问题描述】:

我在 google 登录身份验证过程中遇到错误。以下是错误:

Error:Execution failed for task ':app:processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 16.0.1.

我正在尝试从 firebase 的官方文档中获取代码。

implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'

如何解决??

【问题讨论】:

    标签: android firebase firebase-authentication google-signin


    【解决方案1】:

    答案在错误信息中:

    “请通过更新 google-services 插件的版本(有关最新版本的信息可在 https://bintray.com/android/android-tools/com.google.gms.google-services/ 获得)或将 com.google.android.gms 的版本更新到 16.0.1 来解决版本冲突。 "

    将“com.google.android.gms:play-services-auth:15.0.1”设置为“16.0.1”。

    还要检查您是否已在 firebase 控制台中启用身份验证(不确定您使用哪种身份验证方法,但启用您使用的那个)。

    【讨论】:

    • 使用新的依赖项、错误消息、您用于登录的方法以及您的身份验证屏幕截图更新您的问题 -> 登录方法。如果 google-service 版本解决方案不起作用,您在原始问题中的信息还不够。