2013-04-05 87 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

相关问题