延迟绑定失败错误 - Ginjector

时间:2011-07-02 04:09:05

标签: gwt guice

您好我的gwt应用程序出现问题,我有下面的错误,虽然我有这个继承:

<inherits name='com.google.gwt.inject.Inject' />

错误:

Caused by: java.lang.RuntimeException: Deferred binding failed for 'com.mygwtapp.client.gin.Injector' (did you forget to inherit a required module?)
    at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
    at com.google.gwt.core.client.GWT.create(GWT.java:98)
    at com.mygwtapp.client.Mygwtapp.onModuleLoad(Mygwtapp.java:29)

Mygwtapp.java

@Override
public void onModuleLoad() {

    final Injector ginjector = GWT.create(Injector.class);

    final MainPresenter mainPresenter = ginjector.getMainPresenter();

    mainPresenter.bind();

    RootPanel.get().add(mainPresenter.getDisplay().asWidget());     

    logEvent(ginjector.getEventBus());
}

2 个答案:

答案 0 :(得分:2)

“延迟绑定失败”错误始终,前面是指向确切问题的特定错误。

答案 1 :(得分:0)