eclipse 来自 svn 的 grails 项目错误:无法解析 GroovyObject
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4495564/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
error of grails project from svn : GroovyObject cannot be resolved
提问by atian25
when i check out a new grails project from svn, i got some error:
当我从 svn 检出一个新的 grails 项目时,出现了一些错误:
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
1.项目未构建,因为其构建路径不完整。找不到 groovy.lang.GroovyObject 的类文件。修复构建路径然后尝试构建这个项目
2. groovy.lang.GroovyObject 类型无法解析。它是从所需的 .class 文件间接引用的
i had config the grails path, and it can run-app well. but,still error warning.
我已经配置了 grails 路径,它可以很好地运行应用程序。但是,仍然错误警告。
回答by atian25
Solved by "grails tool -> refresh dependencies"
通过“grails 工具 -> 刷新依赖项”解决
回答by pherris
I ran into the same error and fixed it by adding the Groovy runtime libraries to the build path:
我遇到了同样的错误并通过将 Groovy 运行时库添加到构建路径来修复它:
Configure Build Path -> Libraries -> Add Library -> Groovy Runtime Libraries.
配置构建路径 -> 库 -> 添加库 -> Groovy 运行时库。
Not using STS.
不使用 STS。
回答by Durgesh Gupta
We have to set Groovy Compiler in Eclipse for specific project.
1. Eclipse -> Windows -> Preference -> Search Groovy Compiler.
2. Click on Configure Project Specific Setting.
3. Select Your Project.
4. Will Open Groovy Compiler Wizard.
5. Set Compiler level for this project.
6. Apply and close it.
7. Now All groovy Jar file will download and build will get success.
it worked for me.
Hope this answer will help.
我们必须在 Eclipse 中为特定项目设置 Groovy Compiler。
1. Eclipse -> Windows -> Preference -> Search Groovy Compiler。
2. 单击配置项目特定设置。
3. 选择您的项目。
4. 会打开Groovy Compiler Wizard。
5. 为此项目设置编译器级别。
6. 应用并关闭它。
7. 现在所有 groovy Jar 文件都将下载并构建将获得成功。
它对我有用。
希望这个答案会有所帮助。
回答by Santosh Anantharamaiah
Please make sure there are no errors in the "Problems Tab". Until and unless you clear these errors, you will not be able to resolve this error.
请确保“问题选项卡”中没有错误。除非您清除这些错误,否则您将无法解决此错误。
Run "Refresh Dependencies" and make sure all the required dependencies are properly downloaded.
运行“Refresh Dependencies”并确保正确下载了所有必需的依赖项。