2015-10-27 35 views
0

我使用libgdx建立一個遊戲,突然,我打開Eclipse和它說的標記聲明必須得到很好的形成

的標記聲明包含或指向文檔類型聲明必須得到很好的形成

這個XML:/塔征服核/ 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> 

生成項目反正和它的作品,但錯誤一直存在。我試圖刪除文件和書面方式回來,但它口口聲聲說有一個錯誤

回答

0

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提供了一個錯誤。

解決辦法似乎很簡單:使用的DTD新的URL在XML

<!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返回庫文件的HTML表示和Eclipse將再次抱怨。 也

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

似乎不能正常工作。

然後,您可以創建DTD的本地版本,並相應更改XML中的doctype聲明,或者在驗證不是必需的情況下簡單地刪除doctype聲明。