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

Gradle无法解析com.google.firebase:firebase-auth:23.1.0依赖的问题求助

Gradle无法解析com.google.firebase:firebase-auth:23.1.0依赖的问题求助

我不是一个常规的Java开发者,下面是我的build.gradle配置:

plugins {
    id 'java'
    id 'org.springframework.boot' version '3.3.5'
    id 'io.spring.dependency-management' version '1.1.6'
}

group = 'com.amkhrjee'
version = '0.0.1'

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(22)
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'com.google.firebase:firebase-admin:9.4.1'
    implementation 'com.google.firebase:firebase-auth:23.1.0'

    implementation 'org.springframework.boot:spring-boot-starter-web'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

tasks.named('test') {
    useJUnitPlatform()
}

我现在遇到了如下错误:

Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find com.google.firebase:firebase-auth:23.1.0.
     Required by:
         root project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

我确认这个依赖在Maven仓库中是存在的,但实在搞不懂我的配置哪里出了问题。另外我试过在repositories块里添加google()仓库,但也没能解决这个问题。

备注:内容来源于stack exchange,提问作者amkhrjee

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.15 09:38:06