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()
GwtApplicationLogger.java:54 GwtApplication: exception: com.badlogic.gdx.utils.GdxRuntimeException: Could not submit AsyncTask: InflaterInputStream not supported in GWT
In my Game 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.
My GdxDefinitionSuperdev.gwt.xml file:
<?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>
The solution is to change the Tile Layer Format in the property of the .tmx file and remove zip compression. I used "Tiled" to edit the property.