Java 标记声明必须格式良好

Java 标记声明必须格式良好,java,android,xml,gwt,libgdx,Java,Android,Xml,Gwt,Libgdx,我正在使用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-

我正在使用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">
似乎工作不正常

然后,您可以创建DTD的本地版本,并相应地更改XML中的doctype声明,或者在验证不是必需的情况下删除doctype声明

https://gwt.googlesource.com/gwt/+/master/distro-source/core/src/gwt-module.dtd?format=TEXT