2016-01-20 40 views
0

我一直無法使超級開發模式與GWT 2.7一起工作。和GXT 3.1.x傳統的開發模式沒有問題,但超級開發模式和GWT編譯這個項目並不成功。升級到GWT 2.7後,「無法解析爲類型」。並嘗試編譯一個多項目模塊

我目前正在使用Eclipse 4.4.2和Java 1.7_2在Windows上工作。 所以我們假設我們有2個GWT/GXT項目(沒有Maven),GWT 2.6和GXT 3.1.x(項目在存儲庫中備份)。

一個叫做A,另一個叫做B.項目A有很多包,沒有入口點(只是作爲一個庫/框架),只是一個抽象的入口點,每個其他項目都要擴展。另一個稱爲B,並從A繼承,入口點擴展了入口點A.

在古典開發模式下,在GWT 2.6下啓動項目時,項目工作正常。升級到GWT 2.7時。它在傳統開發模式下可以正常工作,甚至在超級開發模式下Codeserver開始運行,但是當編譯模塊時,我得到一個錯誤,一些代碼似乎不能在包的「客戶端」下生存,所以我遷移了它放到一個自己的包中,並將源路徑添加到A.gwt.xml中。

修復這個錯誤,並再次啓動超級開發模式(並試圖GWT編譯時)後,我得到的錯誤是這樣的:包括在項目B的構建路徑

Ignored 15 units with compilation errors in first pass. 
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. 
    Finding entry point classes 
     Tracing compile failure path for type 'com.example.b.client.B' 
     [ERROR] Errors in 'file:/C:/Workspace/ProjectB/src/com/example/b/client/B.java' 
      [ERROR] com.example.a.client.A cannot be resolved to a type 
     [ERROR] Errors in 'file:/C:/Workspace/ProjectA/src/com/example/a/view/ExampleLayout.java' 
      [ERROR] com.example.a.view.ILayout cannot be resolved to a type 
     [ERROR] Errors in 'file:/C:/Workspace/ProjectA/src/com/example/a/client/service/ExampleServiceAsync.java' 
      [ERROR] com.example.a.model.Examplemodel cannot be resolved to a type 
     [ERROR] Errors in 'file:/C:/Workspace/ProjectA/src/com/example/a/model/OtherExampleModel.java' 
      [ERROR] com.example.a.hibernate.model.ComOtherExampleModel cannot be resolved to a type 
     [ERROR] Errors in 'file:/C:/Workspace/ProjectB/src/com/example/b/client/service/OtherExampleServiceAsync.java' 
      [ERROR] com.example.a.model.NewExampleModel cannot be resolved to a type 
     ... 
    (and many more) 

A計劃,當創建一個自定義運行配置,其中項目添加到「用戶條目」和添加源文件夾到「用戶」條目不會工作。對於自定義運行配置,我用類似下面的參數:

"-src src/ -src ${workspace_loc:ProjectA} com.example.b.B"

甚至:

"-src src/ -src ${workspace_loc:ProjectA} com.example.b.B com.example.a.A"

我廣泛的搜索解決方案,甚至試圖重新設置工作區,結帳從庫再次項目,組織進口,甚至將每個包添加到A的構建路徑。

我也嘗試將這添加到.gwt.xml文件d idn't工作:

<add-linker name="xsiframe"/> 

我怎樣才能解決「不能被解析爲一個類型」的錯誤? 我真的很感激每一種形式的幫助來完成這個問題!謝謝!

回答

1

一個可能的問題可能是您的GXT版本。如果您使用的是GXT 3.1.1(這是最新的GPL版本),那麼您無法使用GWT 2.7.0。

看看版本表:

GXT versions

正如你所看到的,煎茶GXT 3.1.1不支持GWT 2.7.0。支持GWT 2.7.0的第一個GXT版本是GXT 3.1.2。

+0

所以我們現在看看我們有哪些版本的GXT,我們目前正在使用GXT 3.1.4,所以它應該是兼容的。你有什麼其他想法可以解決問題嗎? –

+0

你可以再次運行應用程序,這次使用logLevel TRACE併發布新的輸出? –

+0

我把錯誤日誌放在一個文本文件中的logLevel TRACE上並且上傳了它[這裏](http://we.tl/3NO4cPrwnW) –

相關問題