[英]Libgdx HTML build only Asset Manager error
When I build my project with gradlew html:superDev
and run the game in Chrome(I tried Edge too) with http://localhost:8080/ the asset manager raises the following exception when calling finishLoading()
当我使用
gradlew html:superDev
构建我的项目并使用 http://localhost:8080/ 在 Chrome 中运行游戏(我也尝试过 Edge)时,资产管理器在调用finishLoading()
时引发以下异常
GwtApplicationLogger.java:54 GwtApplication: exception: com.badlogic.gdx.utils.GdxRuntimeException: Could not submit AsyncTask: InflaterInputStream not supported in GWT GwtApplicationLogger.java:54 GwtApplication: 异常: com.badlogic.gdx.utils.GdxRuntimeException: 无法提交 AsyncTask: InflaterInputStream 在 Z3BC0A024685BED45EDB9 中不支持
In my Game class:在我的游戏 class 中:
public void create() {
System.out.println("start...");
Gdx.app.setLogLevel(LOG_DEBUG);
Gdx.app.log("Gdx version", "*************************");
Gdx.app.log("Gdx version", com.badlogic.gdx.Version.VERSION);
Gdx.app.log("Gdx version", "*************************");
assets = new AssetManager();
assets.setLoader(TiledMap.class, new TmxMapLoader(new InternalFileHandleResolver()));
assets.load(mapPath, TiledMap.class);
assets.load(spritesPackPath, TextureAtlas.class);
assets.finishLoading();
.
.
.
}
The asset manager loads everything fine in my Desktop and Android build so I am puzzled.资产管理器在我的桌面和 Android 构建中加载一切正常,所以我很困惑。
My GdxDefinitionSuperdev.gwt.xml file:我的 GdxDefinitionSuperdev.gwt.xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://www.gwtproject.org/doctype/2.8.0/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='com.badlogic.gdx.controllers' />
<inherits name='com.badlogic.gdx.controllers.controllers-gwt' />
<inherits name="com.google.gwt.logging.Logging"/>
<inherits name='com.ram52.princess1.GdxDefinition' />
<collapse-all-properties />
<add-linker name="xsiframe"/>
<set-configuration-property name="devModeRedirectEnabled" value="true"/>
<set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>
</module>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.