2013-04-05 52 views
1

我試圖在GWT項目中開始使用GWTQuery。無法在Eclipse中使用GWTQuery編譯GWT項目

  • 我創建的樣本GWT項目在Eclipse
  • 新增gwtquery-1.3.2.jar 戰成/ WEB-INF/lib目錄
  • 編輯Myproject.gwt.xml(添加<繼承名= 「com.google.gwt.query.Query」/>)

當我編譯項目寫入遞延錯誤很多,但在最後它帶有:

Scanning for additional dependencies: jar:file:/C:/eclipseBacklog/Backlog/war/WEB-INF/lib/gwtquery-1.3.2.jar!/com/google/gwt/query/client/GQuery.java 
     Computing all possible rebind results for 'com.google.gwt.query.client.GQuery' 
     Rebinding com.google.gwt.query.client.GQuery 
      Checking rule <replace-with class='com.google.gwt.query.client.impl.SelectorEngineNativeIE8'/> 
       [ERROR] Errors in 'jar:file:/C:/eclipseBacklog/Backlog/war/WEB-INF/lib/gwtquery-1.3.2.jar!/com/google/gwt/query/client/Properties.java' 
        [ERROR] Line 20: The import com.google.gwt.core.shared cannot be resolved 
        [ERROR] Line 39: GWT cannot be resolved 
       [ERROR] Unable to find type 'com.google.gwt.query.client.GQuery' 
        [ERROR] Hint: Previous compiler errors may have made this type unavailable 
        [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly 
    [ERROR] Errors in 'jar:file:/C:/eclipseBacklog/Backlog/war/WEB-INF/lib/gwtquery-1.3.2.jar!/com/google/gwt/query/client/GQuery.java' 
     [ERROR] Line 1483: Failed to resolve 'com.google.gwt.query.client.GQuery' via deferred binding 

我在做什麼錯了?

+0

HTTP:/ /stackoverflow.com/questions/14214441/using-gwtquery-with-gwt – 2013-04-05 19:24:47

+0

我不使用maven,我剛剛創建了一個Eclipse項目,將gwtquery-1.3.2.jar添加到classpath中,並將「inherits」添加到Myproject.gwt中.XML。我沒有找到build.xml,所以跳過了這一步。 – Artsiom 2013-04-05 20:52:55

回答

2

檢查您的gwt版本,您必須更新到GWT-2.5.x。因爲這個gquery的神器有它不希望的依賴。 2.5中有兩個GWT.java類,並且gquery錯誤地取決於新的com.google.gwt.core.shared

在gwtquery站點上打開一個問題,因爲這個版本應該可以在老的gwt版本中工作。

你也可以改變gquery版本1.3.1或1.4.0-SNAPSHOT

更新:我剛剛deprecated version 1.3.2,併發布了1.3.3與以前版本的GWT編譯

+0

是的,你是對的!我已經將gwtunit版本更改爲1.3.1,並且可行!非常感謝你! – Artsiom 2013-04-06 09:13:46

+0

版本1.3.3修復了它,更新了我的評論 – 2013-04-10 06:28:51