2010-12-21 55 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文件將下載並構建將獲得成功。
它爲我工作。
希望這個答案會有所幫助。