gpt4 book ai didi

即使在官方教程上也出现 GWT 错误 : Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly

转载 作者:行者123 更新时间:2023-12-05 04:50:21 27 4
gpt4 key购买 nike

我正在学习 GWT 并尝试运行 this tutorial Vogella 和 official GWT tutorial .

在 Windows 10 和 JDK 11 上使用 Eclipse GWT 插件 3.0

我标记了 Maven Project 复选框。

当我右键单击并运行为

Turning off precompile in incremental mode.
Super Dev Mode starting up
workDir: C:\Users\My\AppData\Local\Temp\gwt-codeserver-8137229043727681777.tmp
2021-04-29 12:03:13.494:INFO::main: Logging initialized @718ms
Loading Java files in de.vogella.gwt.helloworld.De_vogella_gwt_helloworld.
[ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User')

我看到是继承了User

<?xml version="1.0" encoding="UTF-8"?>
<!--
When updating your version of GWT, you should also update this DTD reference,
so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.8.1//EN"
"http://www.gwtproject.org/doctype/2.8.1/gwt-module.dtd">
<module rename-to='de_vogella_gwt_helloworld'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>

<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->

<!-- Other module inherits -->

<!-- Specify the app entry point class. -->
<entry-point class='de.vogella.gwt.helloworld.client.De_vogella_gwt_helloworld'/>

<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>

<!-- allow Super Dev Mode -->
<add-linker name="xsiframe"/>
</module>

SO question与我的问题无关。

最佳答案

几乎可以肯定,您要么在类路径中缺少 gwt-user.jar,要么 gwt-user.jar 版本与 gwt-dev.jar 不匹配,这会导致问题。每个模块都会自动继承 com.google.gwt.core.Core(尽管有错误消息),并且如您的 .gwt.xml 所示,您已经添加了用户。

--

此外,从您链接的 SO 帖子中,请检查评论 - 列出了一些更好、更现代的教程。

关于即使在官方教程上也出现 GWT 错误 : Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67322111/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com