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

Android Firebase登录系统开发中google-services版本冲突求助

Fixing Version Conflict in Firebase Login Integration for Android

Hey there! As a fellow Android dev who’s tangled with this exact Firebase version conflict before, let me walk you through two solid fixes to get your login system back on track:

Option 1: Update the google-services Plugin

Navigate to your project’s root build.gradle file (not the app module one) and find the dependencies block under buildscript. You’ll see a line that looks like this:

classpath 'com.google.gms:google-services:x.x.x'

Swap out x.x.x for the latest available version of the google-services plugin. Sticking to the most recent stable release will help avoid compatibility gaps.

Option 2: Align All com.google.android.gms Dependency Versions

If updating the plugin doesn’t resolve the conflict, check your app module’s build.gradle file. Look for every dependency starting with com.google.android.gms:play-services- or Firebase-related libraries (like com.google.firebase:firebase-auth).

The golden rule here is consistency — make sure all these dependencies use the exact same latest version. For example:

implementation 'com.google.android.gms:play-services-auth:20.7.0'
implementation 'com.google.firebase:firebase-auth:22.3.1'

Replace the version numbers with the newest stable releases for these libraries.

Quick Post-Fix Checks

After making either change:

  • Click "Sync Now" in Android Studio to apply the updates
  • Run a clean build (Build > Clean Project) followed by a rebuild to clear any cached conflicts

内容的提问来源于stack exchange,提问作者Diogo Vicente

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.22 07:57:48