在创建LibGDX应用程序时,我试图让GWT和HTML5版本正常工作。当我生成的基本应用程序正常工作时,我试图获得一个我已经工作了一段时间的应用程序,并在更新了 * .gwt.xml文件后使用了源代码的位置遇到这个错误。
com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Payload
com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Target
com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Source
java.lang.StringIndexOutOfBoundsException
如果您想阅读整个日志:http://pastebin.com/NxVKp2eA
我不知道在哪里开始找到这个错误的来源,因为它似乎植根于libGDX和scene2d,如果你可以启发我会很好。
MY HTML ENTRY POINT:
package com.mygdx.game.client;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.backends.gwt.GwtApplication;
import com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration;
import com.nolevelcap.wc.MainWC;
public class HtmlLauncher extends GwtApplication {
@Override
public GwtApplicationConfiguration getConfig () {
return new GwtApplicationConfiguration(1280, 720);
}
@Override
public ApplicationListener getApplicationListener () {
return new MainWC();
}
}
MY * .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="com/nolevelcap/wc" />
<source path="com/nolevelcap/events" />
<source path="com/nolevelcap/widget" />
<source path="com/nolevelcap/utils" />
</module>
我的GwtDefinition.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 rename-to="html">
<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
<inherits name='com.badlogic.gdx.physics.box2d.box2d-gwt' />
<inherits name='MainWC' />
<entry-point class='com.mygdx.game.client.HtmlLauncher' />
<set-configuration-property name="gdx.assetpath" value="../core/assets" />
</module>
我的GwtDefinitionSuperDev.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 rename-to="html">
<inherits name='com.badlogic.gdx.backends.gdx_backends_gwt' />
<inherits name='com.badlogic.gdx.physics.box2d.box2d-gwt' />
<inherits name='MyTestGame' />
<entry-point class='com.mygdx.game.client.HtmlLauncher' />
<add-linker name="xsiframe"/>
<set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>
<set-configuration-property name="devModeRedirectEnabled" value="true"/>
<set-configuration-property name="gdx.assetpath" value="../core/assets" />
</module>