【问题标题】:GWT Error: There is '1' error in 'gwt-module.dtd'GWT 错误:“gwt-module.dtd”中有“1”错误
【发布时间】:2021-04-29 11:19:12
【问题描述】:

我正在学习 GWT,并试图运行这个 tutorial by Vogella

在 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 中,我也会遇到同样的错误

【问题讨论】:

标签: gwt


【解决方案1】:

从这个post,我发现生成的dtd是错误的。

“http://gwtproject.org/doctype/2.8.1/gwt-module.dtd”

我更正了

“http://www.gwtproject.org/doctype/2.8.1/gwt-module.dtd”

错误消失了!

【讨论】:

  • 天哪,这不可能是真的?!
  • 那么 GWT 到底有多死,真的??
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2013-06-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多