Image format 'ABGR8' is unsupported for TextureAtlas on android

When trying to use the texture atlas on an android device it crashes with the following exception: SEVERE Exception thrown in Thread[GLThread 1667,5,main]
   com.jme3.renderer.RendererException: Image format 'ABGR8' is unsupported by the video hardware.
       at com.jme3.renderer.opengl.TextureUtil.getImageFormatWithError(
       at com.jme3.renderer.opengl.TextureUtil.uploadTexture(
       at com.jme3.renderer.opengl.GLRenderer.updateTexImageData(
       at com.jme3.renderer.opengl.GLRenderer.setTexture(
       at com.jme3.material.Material.updateShaderMaterialParameters(
       at com.jme3.material.Material.render(
       at com.jme3.renderer.RenderManager.renderGeometry(
       at com.jme3.renderer.queue.RenderQueue.renderGeometryList(
       at com.jme3.renderer.queue.RenderQueue.renderQueue(
       at com.jme3.renderer.RenderManager.renderViewPortQueues(
       at com.jme3.renderer.RenderManager.flushQueue(
       at com.jme3.renderer.RenderManager.renderViewPort(
       at com.jme3.renderer.RenderManager.render(
       at android.opengl.GLSurfaceView$GLThread.guardedRun(
       at android.opengl.GLSurfaceView$

The usage of the atlas is:

atlas = new TextureAtlas(width, height);

for(...) { atlas.addTexture(..., "master")); }

masterTexture = atlas.getAtlasTexture("master");

// then, the texture is used

It works fine on desktop devices so… is it an engine (3.1) bug?

It seems like a hardware problem.

According to the comment here and this other post I supposed it shouldn’t be crashing because of the hardware. I’ve tried it in multiple android devices (relatively new ones) and it always throws it.

Using the TextureAtlas class on a live mobile application sounds like a massive design flaw. Its basically meant for when you create the assets for a game to combine textures etc which you later load from a j3o… Its kinda dumb to do that work when the user is starting your app.

I Could premake the combined texture (texture-atlas) in many ways. Saving it in the j3o or making a static atlas but for this specific case I was trying to minimize the atlas size (I dont care about the loading time). The textures being used depend on every match and they are a few compared with the available (eg: 50 images but only 3 used per match). These are per user selection so there isnt a static pre-make option.