【问题标题】:GWT application runs in dev mode but fails to compileGWT 应用程序在开发模式下运行但无法编译
【发布时间】:2012-04-18 00:35:02
【问题描述】:

我的 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。

【问题讨论】:

    标签: gwt gwt-gin gwt-platform


    【解决方案1】:

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

    确保这两个都绑定在您的 ginjector 中(或者您为它们定义了 replace-with 规则),或者删除对它们的引用。

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

    【讨论】:

    • 这真的很难。很好地发现了这么少的信息和很好的解释!
    【解决方案2】:

    请参阅文档:Binding Everything Together。您必须将演示者、视图和代理绑定在一起。尽管如此,我很惊讶它在开发模式下工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-25
      相关资源
      最近更新 更多