小编Ton*_*hen的帖子

IntelliJ Gradle 构建失败:不兼容,因为组件与 Java 17 兼容并且消费者需要 Java 11

在 IntelliJ 中,当我对从 start.spring.io 下载的新项目进行干净构建时,会出现错误。

start.spring.io 上的 Spring 配置

我已经安装了直接从 IntelliJ 下载的 Java 17 JDK (Amazon Corretto)

在终端中,运行命令:./gradlew clean build

导致以下错误:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'learn-spring-framework'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.1.
     Required by:
         project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.1
      > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.1 was found. The consumer was configured to find a runtime of a library compatible with …
Run Code Online (Sandbox Code Playgroud)

intellij-idea gradle spring-boot java-17

8
推荐指数
1
解决办法
1万
查看次数

标签 统计

gradle ×1

intellij-idea ×1

java-17 ×1

spring-boot ×1