HTML 5中遇到'com / badlogic / gdx / backends / gwt / GwtApplication.java中的错误

时间:2013-05-16 06:21:43

标签: html5 gwt libgdx

最近我开始了解这个令人敬畏的框架,即Libgdx。我对这个框架完全不熟悉,因此有一些障碍是显而易见的。我克隆了整个存储库,我还运行了gdx-setup-ui.jar文件。它给了我4个基本的入门项目。 (my-gdx-game,my-gdx-game-android,my-gdx-game-desktop,my-gdx-game-html) android和桌面项目运行良好,但是,当我尝试运行HTML5项目时,点击URL链接后,我遇到了这个错误,

[TRACE] [com.me.mygdxgame.GwtDefinition] - Finding entry point classes
[ERROR] [com.me.mygdxgame.GwtDefinition] - Errors in 'com/badlogic/gdx/backends/gwt/GwtApplication.java'
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 273: No source code is available for type com.badlogic.gdx.Net; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 393: No source code is available for type com.badlogic.gdx.utils.Clipboard; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Errors in 'com/badlogic/gdx/Application.java'
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 117: No source code is available for type com.badlogic.gdx.Net; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 159: No source code is available for type com.badlogic.gdx.utils.Clipboard; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Errors in 'com/badlogic/gdx/backends/gwt/GwtNet.java'
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 12: No source code is available for type com.badlogic.gdx.Net; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 14: No source code is available for type com.badlogic.gdx.Net.HttpResult; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 24: No source code is available for type com.badlogic.gdx.net.ServerSocket; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 24: No source code is available for type com.badlogic.gdx.Net.Protocol; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 24: No source code is available for type com.badlogic.gdx.net.ServerSocketHints; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 29: No source code is available for type com.badlogic.gdx.net.Socket; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 29: No source code is available for type com.badlogic.gdx.net.SocketHints; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Errors in 'com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/utils/Array.java'
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 342: No source code is available for type com.badlogic.gdx.utils.StringBuilder; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Errors in 'com/badlogic/gdx/utils/ObjectMap.java'
[ERROR] [com.me.mygdxgame.GwtDefinition] - Line 468: No source code is available for type com.badlogic.gdx.utils.StringBuilder; did you forget to inherit a required module?
[ERROR] [com.me.mygdxgame.GwtDefinition] - Unable to find type 'com.me.mygdxgame.client.GwtLauncher'
[ERROR] [com.me.mygdxgame.GwtDefinition] - Hint: Previous compiler errors may have made this type unavailable
[ERROR] [com.me.mygdxgame.GwtDefinition] - Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
[ERROR] [com.me.mygdxgame.GwtDefinition] - Failed to load module 'com.me.mygdxgame.GwtDefinition' from user agent 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1' at localhost:56812

目前我使用的是libgdx版本0.9.7。我的操作系统是Ubuntu 12,Eclipse Indigo。 请帮帮我。感谢。

2 个答案:

答案 0 :(得分:1)

我遇到了类似的错误..刚刚将Libgdx jar更新到最新的每晚构建版本,问题就解决了。

答案 1 :(得分:0)

你的html项目的java构建路径中添加了哪些jar。还要检查html项目中是否存在gdx-sources.jar。同样在java构建路径中转到导出选项卡并检查是否已检查所有依赖项。