标记声明必须格式正确
The markup declarations must be well-formed
我正在使用 libgdx 构建游戏,突然,我打开了 eclipse,它显示
文档类型声明包含或指向的标记声明必须格式正确
在此 xml 上:/Tower Conquest-core/src/TowerConquest.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
<module>
<source path="noxer/games/ballons" />
</module>
项目无论如何都会生成并且可以运行,但错误仍然存在。我尝试删除文件并将其写回,但它一直说有错误
Eclipse 尝试使用引用的 DTD 验证 XML:
当你打开这个 DTD 时你会得到
Source code for the GWT project has moved to https://gwt.googlesource.com
The file you're looking for can be now found at
https://gwt.googlesource.com/gwt/+/master/./distro-source/core/src/gwt-module.dtd
(if it's not been deleted or renamed since then.)
显然这不是有效的 DTD,因此 Eclipse 给出了一个错误。
解决方案似乎很简单:在 XML
中为 DTD 使用新的 URL
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "https://gwt.googlesource.com/gwt/+/master/distro-source/core/src/gwt-module.dtd">
不幸的是,这个 URL returns 存储库文件的 HTML 表示和 Eclipse 将再次抱怨。
还有
https://gwt.googlesource.com/gwt/+/master/distro-source/core/src/gwt-module.dtd?format=TEXT
似乎无法正常工作。
然后您可以创建 DTD 的本地版本并相应地更改 XML 中的 doctype 声明,或者如果不需要验证则简单地删除 doctype 声明。
我正在使用 libgdx 构建游戏,突然,我打开了 eclipse,它显示
文档类型声明包含或指向的标记声明必须格式正确
在此 xml 上:/Tower Conquest-core/src/TowerConquest.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
<module>
<source path="noxer/games/ballons" />
</module>
项目无论如何都会生成并且可以运行,但错误仍然存在。我尝试删除文件并将其写回,但它一直说有错误
Eclipse 尝试使用引用的 DTD 验证 XML:
当你打开这个 DTD 时你会得到
Source code for the GWT project has moved to https://gwt.googlesource.com
The file you're looking for can be now found at
https://gwt.googlesource.com/gwt/+/master/./distro-source/core/src/gwt-module.dtd
(if it's not been deleted or renamed since then.)
显然这不是有效的 DTD,因此 Eclipse 给出了一个错误。
解决方案似乎很简单:在 XML
中为 DTD 使用新的 URL<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "https://gwt.googlesource.com/gwt/+/master/distro-source/core/src/gwt-module.dtd">
不幸的是,这个 URL returns 存储库文件的 HTML 表示和 Eclipse 将再次抱怨。 还有
https://gwt.googlesource.com/gwt/+/master/distro-source/core/src/gwt-module.dtd?format=TEXT
似乎无法正常工作。
然后您可以创建 DTD 的本地版本并相应地更改 XML 中的 doctype 声明,或者如果不需要验证则简单地删除 doctype 声明。