我正在遵循Grail官方入门指南 https://docs.grails.org/3.3.9/guide/gettingStarted.html来运行Hello World应用程序。
但是,当我运行命令grails create-app helloworld --profile=web
时,出现以下错误:
| Error Error initializing classpath: startup failed:
build file '/Users/sdicola/build.gradle': 3: expecting "interface", found '<newline>' @ line 3, column 20.
@buildRepositories@
^
1 error
(NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
build file '/Users/sdicola/build.gradle': 3: expecting "interface", found '<newline>' @ line 3, column 20.
@buildRepositories@
^
1 error
| Error Error initializing classpath: startup failed:
build file '/Users/sdicola/build.gradle': 3: expecting "interface", found '<newline>' @ line 3, column 20.
@buildRepositories@
^
1 error
我正在使用以下SW版本:
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
------------------------------------------------------------
Gradle 5.3.1
------------------------------------------------------------
Build time: 2019-03-28 09:09:23 UTC
Revision: f2fae6ba563cfb772c8bc35d31e43c59a5b620c3
Kotlin: 1.3.21
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_201 (Oracle Corporation 25.201-b09)
OS: Mac OS X 10.13.6 x86_64
| Grails Version: 4.0.0.M2
| JVM Version: 1.8.0_201
答案 0 :(得分:0)
在Grails Dev Discuss的Jeff Brown,我删除了一个grails-app
目录,该目录已经以某种方式在我试图从中运行create-app
的目录中创建,并且解决了该问题。