我用Maven、Intellij和GWT编译得到了这个奇怪的问题。我已经在我的桌面pc上设置和工作,但现在我已经撤回更改并将该项目加载到我的另一台计算机上,我得到了以下问题:
...snip... \EmailServiceImpl.java C:\Users\Szabolcs\Java\Workspace\ims-project\ims\src\main\java\nz\co\doltech\ims\shared\domains\InjuryType.java -s C:\Users\Szabolcs\Java\Workspace\ims-project\ims\target\generated-sources\annotations -g -nowarn -target 1.7 -source 1.7 -encoding UTF-8
[INFO] Compiling 370 source files to C:\Users\Szabolcs\Java\Workspace\ims-project\ims\target\ims-1.0-SNAPSHOT\WEB-INF\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] \Users\Szabolcs\Java\Workspace\ims-project\ims\src\main\java\nz\co\doltech\ims\client\application\investigation\InvestigationPresenter.java:[126,26] error: cannot find symbol
[ERROR] \Users\Szabolcs\Java\Workspace\ims-project\ims\src\main\java\nz\co\doltech\ims\client\application\investigation\InvestigationPresenter.java:[126,40] error: cannot find symbol
[ERROR] \Users\Szabolcs\Java\Workspace\ims-project\ims\src\main\java\nz\co\doltech\ims\client\application\investigation\InvestigationPresenter.java:[123,84] error: type argument MyView is not within bounds of type-variable T
[ERROR] \Users\Szabolcs\Java\Workspace\ims-project\ims\src\main\java\nz\co\doltech\ims\client\application\investigation\InvestigationPresenter.java:[204,11] error: cannot find symbol
[ERROR] \Users\Szabolcs\Java\Workspace\ims-project\ims\src\main\java\nz\co\doltech\ims\client\application\investigation\InvestigationModule.java:[10,2] error: no suitable method found for bindPresenter(Class<InvestigationPresenter>,Class<MyView>,Class<InvestigationView>,Class<MyProxy>)
[INFO] 5 errors
更大的日志跟踪视图:这里
将错误点存档到:
123 public class InvestigationPresenter extends IncidentPresenter<InvestigationPresenter.MyView,
InvestigationPresenter.MyProxy> implements InvestigationViewUiHandlers, ChangeSectionHandler {
126 interface MyView extends IncidentView, HasUiHandlers<InvestigationViewUiHandlers> {
void setupValidation(Map<Integer, SectionTuple> sections);
void flush();
void limited(LimitType type);
... snip ...
InvestigationModule.java
public class InvestigationModule extends AbstractPresenterModule {
@Override
protected void configure() {
bind(InvestigationView.Resources.class).asEagerSingleton();
10 bindPresenter(InvestigationPresenter.class, InvestigationPresenter.MyView.class,
InvestigationView.class, InvestigationPresenter.MyProxy.class);
}
}
这毫无意义。IDE没有显示出问题,也不应该.使用相同的编译器设置、相同的JDK、相同的字节码版本等等。它怎么能在我的另一台机器上工作,但现在却不能在这台安装完全相同的机器上工作呢?
我试过:
如对此问题有任何帮助,我们将不胜感激。
发布于 2014-09-10 15:44:59
虽然原因仍然很神秘,但问题与以下事实有关: JAVA编译器很难正确地计算出继承链,而编译器在可以编译的内容上稍微慷慨一点。
从MyView中提取InvestigationPresenter将解决您的问题。
https://stackoverflow.com/questions/25759492
复制相似问题