我不是一名普通的 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
这是我正在使用的依赖项:https://mvnrepository.com/artifact/com.google.firebase/firebase-auth/23.1.0
我无法弄清楚我的配置出了什么问题。
附注我尝试在
google()
中添加 repositories
- 没有帮助。