我只是在 AndEngine 的帮助下测试了一个游戏(实际上它现在只是一个启动画面),在 CyanogenMod(非官方)上测试它时,它只加载了一毫秒,然后关闭。错误是什么?
- 我已经覆盖
onDestroy()
添加System.exit(0);
. - 我已经延长了
BaseGameActivity
。 从类运行的部分
MainActivity
:protected final int width = 640, height = 480; public Camera camera; @Override public EngineOptions onCreateEngineOptions() { camera = new Camera(0, 0, width, height); EngineOptions EO = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new RatioResolutionPolicy(width, height), camera); return EO; }
日志:
E/Trace(2677): error opening trace file: No such file or directory (2)
D/AndEngine(2677): MainActivity.onCreate @(Thread: 'main')
D/dalvikvm(2677): Trying to load lib /data/data/com.example.package/lib/libandengine.so 0x40dbb400
D/dalvikvm(2677): Added shared lib /data/data/com.example.package/lib/libandengine.so 0x40dbb400
D/dalvikvm(2677): No JNI_OnLoad found in /data/data/com.example.package/lib/libandengine.so 0x40dbb400, skipping init
D/AndEngine(2677): MainActivity.onResume @(Thread: 'main')
D/AndEngine(2677): MainActivity.onPause @(Thread: 'main')
D/AndEngine(2677): MainActivity.onDestroy @(Thread: 'main')
D/AndEngine(2677): UpdateThread interrupted. Don't worry - this EngineDestroyedException is most likely expected!
D/AndEngine(2677): org.andengine.engine.Engine$EngineDestroyedException
D/AndEngine(2677): at org.andengine.engine.Engine.throwOnDestroyed(Engine.java:574)
D/AndEngine(2677): at org.andengine.engine.Engine.onTickUpdate(Engine.java:560)
D/AndEngine(2677): at org.andengine.engine.Engine$UpdateThread.run(Engine.java:820)
D/AndEngine(2677): MainActivity.onDestroyResources @(Thread: 'main')
D/AndEngine(2677): MainActivity.onGameDestroyed @(Thread: 'main')
I/AndroidRuntime(2677): VM exiting with result code 0, cleanup skipped.