Java 从Spring初始值设定项生成的生成Spring gradle项目出错

Java 从Spring初始值设定项生成的生成Spring gradle项目出错,java,spring,gradle,intellij-idea,Java,Spring,Gradle,Intellij Idea,我使用一些依赖项创建了一个名为test jdbc demo的演示Gradle项目,不做任何更改,只需使用Open->build.Gradle文件在Intellij上解压并导入,并尝试使用默认Intellij窗口中的Import。导入时,项目不是生成的,并且发生有关渐变依赖项的错误。我在Ubuntu上使用Intellij2019.3和JDK1.8 错误 FAILURE: Build failed with an exception. * Where: Build file '/home/augu

我使用一些依赖项创建了一个名为
test jdbc demo
的演示Gradle项目,不做任何更改,只需使用Open->build.Gradle文件在Intellij上解压并导入,并尝试使用默认Intellij窗口中的
Import
。导入时,项目不是生成的,并且发生有关渐变依赖项的错误。我在Ubuntu上使用Intellij2019.3和JDK1.8

错误

FAILURE: Build failed with an exception.

* Where:
Build file '/home/augusto.cadini/projects/Spring Applications/test-jdbc-demo/build.gradle' line: 2

* What went wrong:
Plugin [id: 'org.springframework.boot', version: '2.2.4.RELEASE'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.springframework.boot:org.springframework.boot.gradle.plugin:2.2.4.RELEASE')
  Searched in the following repositories:
    Gradle Central Plugin Repository

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

CONFIGURE FAILED in 208ms
build.gradle

plugins {
    id 'org.springframework.boot' version '2.2.4.RELEASE'
    id 'io.spring.dependency-management' version '1.0.9.RELEASE'
    id 'java'
}

group = 'com.jdbc'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.springframework.boot:spring-boot-starter-jdbc'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    testImplementation('org.springframework.boot:spring-boot-starter-test') {
        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
    }
}

test {
    useJUnitPlatform()
}

这让我发疯。我得到了同样的错误(这是从Spring Initializer生成的干净项目中得到的)。结果发现这是Gradle版本的问题。当我从命令行运行构建时,收到以下错误消息


一旦我更新了gradle,它的构建就没有问题了。

它是从命令行构建的吗<代码>/gradlew干净构建