我正在学习 GWT 并尝试运行它沃盖拉的教程 https://www.vogella.com/tutorials/GWT/article.html
在 Windows 10 和 JDK 11 上使用 Eclipse GWT 插件 3.0
我在第一行收到此错误Error: There is '1' error in 'gwt-module.dtd'.
/de.vogella.gwt.helloworld/src/de/vogella/gwt/helloworld/De_vogella_gwt_helloworld.gwt.xml
<?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://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>
即使从官方 GWT 教程中我也遇到同样的错误http://www.gwtproject.org/doc/latest/tutorial/index.html http://www.gwtproject.org/doc/latest/tutorial/index.html
由此post https://vaadin.com/forum/thread/16266077/what-is-the-correct-doctype-for-the-gwt-xml-file,我发现生成的dtd是错误的。
“http://gwtproject.org/doctype/2.8.1/gwt-module.dtd”
我将其更正为
"http://www.gwtproject.org/doctype/2.8.1/gwt-module.dtd”
错误消失了!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)