无法在Eclipse中使用GWTQuery编译GWT项目

时间:2013-04-05 19:00:30

标签: gwt gwtquery gquery

我正在尝试在GWT项目中开始使用GWTQuery。

  • 我在Eclipse中创建了示例GWT项目
  • 添加了gwtquery-1.3.2.jar 进入war / WEB-INF / lib
  • 已编辑的Myproject.gwt.xml(已添加< inherits name ='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

我做错了什么?

1 个答案:

答案 0 :(得分: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版本一起编译