我的 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.MyView
和 ResponsePresenter.MyView
,但未绑定(bind)到具体类型。事实上,它在开发模式下工作(我假设您只有一个模块)但没有编译,这表明 ginjector 正在寻找您在运行开发模式时不会遇到的注入(inject)站点。
确保这两个都绑定(bind)在你的 ginjector 中(或者你为它们定义了替换规则),或者删除对它们的引用。
(如果一切顺利,请考虑发布一些代码,例如您的 ginjector 接口(interface),也许是生成的代码、您的模块等)
关于GWT 应用程序在开发模式下运行但无法编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10201165/