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

