有人可以帮我解决问题吗?
我正在从GWT 2.5.1升级到2.6.1并且在尝试运行我的项目的代码服务器时出现以下错误...
[INFO] Compiling module <SOME_MODULE>
[INFO] Validating units:
[INFO] Ignored 1 unit with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO] Computing all possible rebind results for 'com.gwtplatform.mvp.client.DesktopGinjector'
[INFO] Rebinding com.gwtplatform.mvp.client.DesktopGinjector
[INFO] Invoking generator com.google.gwt.inject.rebind.GinjectorGenerator
[INFO] [ERROR] Error injecting com.gwtplatform.mvp.client.proxy.PlaceManager: Unable to create or inherit binding: No @Inject or default constructor found for com.gwtplatform.mvp.client.proxy.PlaceManager
[INFO] Path to required node:
[INFO]
[INFO] com.gwtplatform.mvp.client.proxy.PlaceManager [com.gwtplatform.mvp.client.ClientGinjector#getPlaceManager()]
[INFO]
[...etc.]
Run Code Online (Sandbox Code Playgroud)
似乎GIN延迟绑定引擎试图在接口上寻找构造函数,这当然不存在.
任何建议,将不胜感激.我正在使用Maven.http://mojo.codehaus.org/gwt-maven-plugin/
皮特
[编辑:] 此特定错误是从Gin模块配置中删除此行的结果:
install(new DefaultModule(DefaultPlaceManager.class));
删除该行以尝试跟踪类似的错误.当我知道更多时,会发布更好的正式答案.
正如问题末尾所提到的,该错误是由于从模块配置中删除了重要的一行而导致的。然而,我试图修复的原始错误几乎是相同的,所以我的解决方案可能仍然有用......
对我来说,由于泛型的原因,代码无法通过 GWT 编译。问题是代码在 IDE 中编译得很好,但 GWT 编译错误消息被抑制,剩下的只是“1 个有编译错误的单元”。
我曾经找到的步骤是: