can someone tell me where i make a mistake? i want to use AssetLoader to load textures but.... always have the same error. I thought that problem is with my game so I made new project but I still have error.
Couldn't load dependencies of asset: assets/badlogic.jpg
Here is my code:
public class TestApp extends ApplicationAdapter {
SpriteBatch batch;
Texture img;
@Override
public void create () {
Assets.load();
batch = new SpriteBatch();
img = Assets.manager.get(Assets.image, Texture.class);
}
@Override
public void render () {
Gdx.gl.glClearColor(1, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin();
batch.draw(img, 0, 0);
batch.end();
}
@Override
public void dispose () {
batch.dispose();
img.dispose();
}
}
public class Assets {
public static final AssetManager manager = new AssetManager();
public static final String image = "assets/badlogic.jpg";
public static void load(){
manager.load(image, Texture.class);
manager.finishLoading();
}
public static void dispose(){
manager.dispose();
}
}