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

添加com.firebaseui:firebase-ui-auth:3.2.0时依赖解析失败如何解决?

Hey, I've run into this exact issue before with FirebaseUI Auth, and it's almost always related to version mismatches or missing repository configurations. Let's fix this step by step:

1. Fix Version Compatibility Issues

FirebaseUI has strict dependency requirements for both Firebase SDKs and Android Support Libraries. Your current Support Library version (24.2.0) is way too old for FirebaseUI 3.2.0 — you need to upgrade it to the matching version (27.1.1). Update your app-level build.gradle dependencies like this:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    // Upgrade Support Libraries to match FirebaseUI 3.2.0
    compile 'com.android.support:design:27.1.1'
    compile 'com.android.support:appcompat-v7:27.1.1'
    // Displaying images
    compile 'com.github.bumptech.glide:glide:3.6.1'
    // Firebase SDK versions are correct for FirebaseUI 3.2.0, keep them
    compile 'com.google.firebase:firebase-core:11.8.0'
    compile 'com.google.firebase:firebase-database:11.8.0'
    compile 'com.google.firebase:firebase-auth:11.8.0'
    implementation 'com.firebaseui:firebase-ui-auth:3.2.0'
}

2. Add Google Maven Repository to Root Build.gradle

The firebaseui-android.internal:lintchecks:unspecified error often happens because your project isn't pulling dependencies from Google's Maven repo, where FirebaseUI's internal lint tools are hosted. Check your root-level build.gradle and make sure it includes these repositories:

buildscript {
    repositories {
        jcenter()
        google() // For newer Gradle versions; use `maven { url 'https://maven.google.com' }` if you're on an older version
    }
    dependencies {
        // Use a Gradle plugin version compatible with Support Library 27.1.1
        classpath 'com.android.tools.build:gradle:3.1.4'
        // Match the Google Services plugin to your Firebase SDK version
        classpath 'com.google.gms:google-services:4.0.1'
    }
}

allprojects {
    repositories {
        jcenter()
        google() // This line is critical — don't skip it!
    }
}

3. Clean and Rebuild Your Project

After making these changes, you need to clear cached dependencies and rebuild to ensure everything syncs properly:

  • Go to Build → Clean Project in Android Studio
  • Then run Build → Rebuild Project
  • If you still see errors, try File → Invalidate Caches / Restart and let Android Studio restart before syncing again

Quick Troubleshooting Tip

If the issue persists, try replacing implementation with compile for the FirebaseUI dependency (though implementation is recommended for newer Gradle setups, older versions sometimes have compatibility quirks with it).

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.15 04:03:22