所以我有一個libgdx項目,在桌面上執行完美,但我一直有很多麻煩試圖把它變成一個Web應用程序。libgdx gwt後端導入問題
我現在正在運行的問題是,它看起來不像我正確導入我的gdx後端罐。下面是我的XML文件看起來像:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module rename-to='trmhtml5'>
<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
<inherits name='TeamRogueMiners' />
<!-- Specify the app entry point class. -->
<entry-point class='com.quazandwally.teamrogueminers.client.GwtLauncher'/>
<set-configuration-property name="gdx.assetpath" value="../Android/assets" />
</module>
這是我收到的錯誤:
[TRACE] [trmhtml5] - Finding entry point classes
[ERROR] [trmhtml5] - Errors in 'file:/D:/Dev%20Dropbox/Dropbox/Eclipse/workspace/TRMHTML5/src/com/quazandwally/teamrogueminers/client/GwtLauncher.java'
[ERROR] [trmhtml5] - Line 11: No source code is available for type com.badlogic.gdx.backends.gwt.GwtApplication; did you forget to inherit a required module?
[ERROR] [trmhtml5] - Line 14: No source code is available for type com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration; did you forget to inherit a required module?
[ERROR] [trmhtml5] - Line 23: No source code is available for type com.badlogic.gdx.ApplicationListener; did you forget to inherit a required module?
[ERROR] [trmhtml5] - Unable to find type 'com.quazandwally.teamrogueminers.client.GwtLauncher'
[ERROR] [trmhtml5] - Hint: Previous compiler errors may have made this type unavailable
[ERROR] [trmhtml5] - 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] [trmhtml5] - Failed to load module 'trmhtml5' from user agent 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36' at 127.0.0.1:58554
它認識我TeamRogueMiners類對象,而不是後端罐子的東西。我已經在Java Build Path中包含了gdx-backend-gwt.jar,並且也添加了源文件。我將這些庫放在WEB-INF的lib目錄中,這似乎與生成的代碼如何執行一致,以及示例項目似乎如何執行它。
這是所有與libgdx的最新版本,當我嘗試與nightly構建,它看起來像GwtApplication沒有getApplicationListener方法定義覆蓋。
任何援助將不勝感激!
如果有任何幫助,這也是在Windows 7 64位上使用Eclipse 4.2完成的。
它的確如此。非常感謝! – mtrc
我其實並不知道'-sources.jar'。我被要求編譯應用程序,這不是我的應用程序,並且如果遇到麻煩,您只是爲我節省了很多。 –