我在我的动画应用程序中使用andengine。当我使用精灵点击事件时,它会出现奇怪的问题。我正在使用这个精灵来隐藏在 android 原生布局中显示视图。
我的 logcat 输出
04-01 18:21:43.966: E/AndroidRuntime(1875): FATAL EXCEPTION: GLThread 3832
04-01 18:21:43.966: E/AndroidRuntime(1875): java.lang.IndexOutOfBoundsException: Invalid index 42, size is 42
04-01 18:21:43.966: E/AndroidRuntime(1875): at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)
04-01 18:21:43.966: E/AndroidRuntime(1875): at java.util.ArrayList.get(ArrayList.java:304)
04-01 18:21:43.966: E/AndroidRuntime(1875): at org.andengine.entity.Entity.onManagedDraw(Entity.java:1382)
04-01 18:21:43.966: E/AndroidRuntime(1875): at org.andengine.entity.scene.Scene.onManagedDraw(Scene.java:260)
04-01 18:21:43.966: E/AndroidRuntime(1875): at org.andengine.entity.Entity.onDraw(Entity.java:1160)
04-01 18:21:43.966: E/AndroidRuntime(1875): at org.andengine.engine.Engine.onDrawScene(Engine.java:627)
04-01 18:21:43.966: E/AndroidRuntime(1875): at org.andengine.engine.Engine.onDrawFrame(Engine.java:617)
04-01 18:21:43.966: E/AndroidRuntime(1875): at org.andengine.opengl.view.EngineRenderer.onDrawFrame(EngineRenderer.java:105)
04-01 18:21:43.966: E/AndroidRuntime(1875): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1516)
04-01 18:21:43.966: E/AndroidRuntime(1875): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
我不知道为什么会导致请帮忙
编辑:
04-01 18:53:01.420: D/AndEngine(2899): FirstBaseActivity.onDestroy @(Thread: 'main')
04-01 18:53:01.420: D/AndEngine(2899): UpdateThread interrupted. Don't worry - this EngineDestroyedException is most likely expected!
04-01 18:53:01.420: D/AndEngine(2899): org.andengine.engine.Engine$EngineDestroyedException
04-01 18:53:01.420: D/AndEngine(2899): at org.andengine.engine.Engine.throwOnDestroyed(Engine.java:574)
04-01 18:53:01.420: D/AndEngine(2899): at org.andengine.engine.Engine.onTickUpdate(Engine.java:560)
04-01 18:53:01.420: D/AndEngine(2899): at org.andengine.engine.Engine$UpdateThread.run(Engine.java:820)
04-01 18:53:01.427: D/AndEngine(2899): FirstBaseActivity.onDestroyResources @(Thread: 'main')
04-01 18:53:01.427: D/AndEngine(2899): FirstBaseActivity.onGameDestroyed @(Thread: 'main')
完整的日志猫