GWT 应用程序在开发模式下运行但无法编译

标签 gwt gwt-gin gwt-platform

我的 GWT 应用程序在开发模式下工作,但是当我编译时出现此错误:

[ERROR] Errors in generated://F1C9BA113391FC353E7321372D77396D/com/mygwtapp/client/gin/ClientGinjectorImpl.java'
[ERROR] Line 64:  Rebind result 'com.mygwtapp.client.core.presenter.ResponsePresenter.MyView' must be a class
[ERROR] Line 2319:  Rebind result 'com.mygwtapp.client.core.presenter.MainPagePresenter.MyView' must be a class
[ERROR] Cannot proceed due to previous errors

我正在使用 GWT 2.4.0 和 GwtPlatform。

最佳答案

这表明您已注入(inject) MainPagePresenter.MyViewResponsePresenter.MyView,但未绑定(bind)到具体类型。事实上,它在开发模式下工作(我假设您只有一个模块)但没有编译,这表明 ginjector 正在寻找您在运行开发模式时不会遇到的注入(inject)站点。

确保这两个都绑定(bind)在你的 ginjector 中(或者你为它们定义了替换规则),或者删除对它们的引用。

(如果一切顺利,请考虑发布一些代码,例如您的 ginjector 接口(interface),也许是生成的代码、您的模块等)

关于GWT 应用程序在开发模式下运行但无法编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10201165/

相关文章:

gwt - 使用 GIN 和 mvp4g

java - GWT.create(Class<?>) 与 GIN?

java - 如何在 GWTP 中检索 AbstractPresenterModule 中的 JavaScriptObject 键/值?

java - 使用 MVP 模式

gwt - 在 GWT celltable 中添加超链接

java - GWT:在服务器端获取 java.lang.NoClassDefFoundError

gwt - 如何调试Ginjector?

java - GWT 自动适配复合 Material

java - GWT 2.1 编辑器框架

html - 当在 GWT 和 GWTP 上调用新的 Presenter 时,它有一些方法可以在 html 加载完成后调用吗?