Git克隆了一个新项目,Gradle构建并遇到以下错误消息:
Terminal
$ gradle clean build
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/mkyong/Documents/workspace/hc2/web/build.gradle' line: 25
* What went wrong:
A problem occurred evaluating project ':web'.
> Could not find method compileOnly() for arguments [org.springframework.boot:spring-boot-starter-tomcat] on project ':web'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
使用Gradle 2.4
Terminal
gradle -version
------------------------------------------------------------
Gradle 2.4
------------------------------------------------------------
Build time