Gradle sync-Error:ProjectScopeServices中没有可用的StyledTextOutputFactory类型的服务

时间:2017-03-23 14:37:21

标签: spring intellij-idea gradle spring-boot

这是一个新创建的空项目。 这是我的build.gradle文件。有问题的错误发生在apply plugin:'spring-boot'

group 'com.teamtreehouse'
version '1.0-SNAPSHOT'

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath('org.springframework.boot:spring-boot-gradle-plugin:1.3.3.RELEASE')
    }
}

apply plugin: 'java'
apply plugin: 'spring-boot'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    compile 'org.springframework.boot:spring-boot-starter-data-rest'
    compile 'org.springframework.boot:spring-boot-starter-data-jpa'
    testCompile group: 'junit', name: 'junit', version: '4.11'
}

1 个答案:

答案 0 :(得分:3)

Gradle 3.0中有一个重大的API更改,这意味着Spring Boot的Gradle插件的1.3.3.RELEASE与它不兼容。您需要将Gradle降级到2.x或将Spring Boot升级到1.5.x。