3

我只是在 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.
4

1 回答 1

3

如果我一次又一次地打开应用程序,它会打开几次之一,在我在清单中提到这一点之后,它总是打开:

android:configChanges="orientation|screenSize"

不知道为什么,但是如果您忘记提及这一点,这是 andengine 的问题。

于 2013-04-13T07:51:10.043 回答