2010-12-21 32 views
11

当我检查出从SVN一个新的Grails项目中,我得到了一些错误:错误从SVN Grails项目的:的GroovyObject无法解决

1.The project was not built since its build path is incomplete. Cannot find the class file for groovy.lang.GroovyObject. Fix the build path then try building this project

2.The type groovy.lang.GroovyObject cannot be resolved. It is indirectly referenced from required .class files

我已经配置Grails的路径,它可以运行的应用程序好。但仍然有错误警告。

alt text

+0

这是IDE问题吗?你在用哪个?哪个版本? STS? – Christian 2010-12-21 06:58:08

+0

STS,最新版本 – atian25 2010-12-21 12:03:06

回答

14

要解决“Grails的工具 - >刷新依赖”

+0

某时,它需要重新启动STS ...似乎是一个IDE错误 – atian25 2011-01-04 13:13:48

+1

这往往会产生大量的其他错误:( – Mat 2013-01-04 20:41:27

11

我遇到了同样的错误,并通过添加Groovy的运行时库的构建路径固定它:

配置构建路径 - >库 - >添加库 - > Groovy运行时库。

不使用STS。

+0

这一个为我工作,谢谢。 – Harlin 2016-07-05 23:33:04

0

请确保在“问题标签”中没有错误。除非您清除这些错误,否则您将无法解决此错误。

运行“刷新依赖项”并确保所有必需的依赖项都已正确下载。

1

我们必须在Eclipse中为特定项目设置Groovy编译器。
1. Eclipse - > Windows - >首选项 - >搜索Groovy编译器。
2.单击配置项目特定设置。
3.选择您的项目。
4.将打开Groovy编译器向导。
5.为此项目设置编译器级别。
6.应用并关闭它。
7.现在所有groovy Jar文件将下载并构建将获得成功。
它为我工作。
希望这个答案会有所帮助。