简体   繁体   English

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

[英]Can't compile GWT project with GWTQuery in Eclipse

I'm trying to start using GWTQuery in a GWT project. 我正在尝试开始在GWT项目中使用GWTQuery。

  • I've created sample GWT project in Eclipse 我已经在Eclipse中创建了示例GWT项目
  • Added gwtquery-1.3.2.jar into war/WEB-INF/lib 在war / WEB-INF / lib中添加了gwtquery-1.3.2.jar
  • Edited Myproject.gwt.xml (added <inherits name='com.google.gwt.query.Query'/>) 编辑了Myproject.gwt.xml(添加了<inherits name ='com.google.gwt.query.Query'/>)

When I compile the project it writes a lot of deffered errors but at the end it comes with: 当我编译项目时,它会写很多延迟的错误,但是最后附带了:

   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

What I'm doing wrong? 我做错了什么?

Check your version of gwt, you have to update to GWT-2.5.x. 检查您的gwt版本,您必须更新到GWT-2.5.x。 because this artifact of gquery has a undesired dependency of it. 因为gquery的这种工件具有不期望的依赖性。 There are two GWT.java classes in 2.5, and gquery is depending of the new com.google.gwt.core.shared by mistake. 2.5中有两个GWT.java类,而gquery错误地依赖于新的com.google.gwt.core.shared

Open an issue at the gwtquery site becasuse this release should work with older gwt version as well. 在gwtquery网站上打开一个问题,因为此版本也应与较早的gwt版本一起使用。

You could also change the gquery version to 1.3.1 or 1.4.0-SNAPSHOT 您还可以将gquery版本更改为1.3.1或1.4.0-SNAPSHOT

Update: I've just deprecated version 1.3.2 , and released 1.3.3 which compiles with previous gwt versions 更新:我刚刚弃用了1.3.2版 ,并发布了1.3.3 ,该版本可以与以前的gwt版本一起编译

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM