0
\$\begingroup\$

I've developed a video game that has worked fine so far. When testing it in a Samsung Galxy A6 tablet (10" resolution with Android 7.0), I get the following error and the map won't load:

Blockquote 12-09 12:49:20.940: E/AndroidRuntime(9369): Process: cam.main, PID: 9369 12-09 12:49:20.940: E/AndroidRuntime(9369): java.lang.NullPointerException: Attempt to read from field 'org.anddev.andengine.opengl.texture.region.TextureRegion org.anddev.andengine.entity.layer.tiled.tmx.TMXTile.mTextureRegion' on a null object reference 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.entity.layer.tiled.tmx.TMXLayer.drawVertices(TMXLayer.java:220) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.entity.shape.Shape.doDraw(Shape.java:102) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.entity.Entity.onManagedDraw(Entity.java:991) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.entity.shape.Shape.onManagedDraw(Shape.java:120) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.entity.Entity.onDraw(Entity.java:875) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.entity.Entity.onManagedDrawChildren(Entity.java:1008) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.entity.Entity.onDrawChildren(Entity.java:1000) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.entity.Entity.onManagedDraw(Entity.java:993) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.entity.scene.Scene.onManagedDraw(Scene.java:233) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.entity.Entity.onDraw(Entity.java:875) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.engine.Engine.onDrawScene(Engine.java:517) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.engine.Engine.onDrawFrame(Engine.java:509) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.opengl.view.RenderSurfaceView$Renderer.onDrawFrame(RenderSurfaceView.java:154) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.opengl.view.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:617) 12-09 12:49:20.940: E/AndroidRuntime(9369): at org.anddev.andengine.opengl.view.GLSurfaceView$GLThread.run(GLSurfaceView.java:549) 12-09 12:49:21.531: E/ApplicationPackageManager(4011): checkSettingsForIconTray value : 0

Rest of screens that are Android native work well. Please help!

\$\endgroup\$
0
\$\begingroup\$

After losing my faith in Andengine in particular and in game development in general, I found a solution for a problem that seemed to be happening not in Tablets only but in any device with Android 7 and higher.

By exporting the tmx files to .xml instead of GZIP compressed everything works well. Almost magic.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.