0
當我想運行android apptication時,我遇到了LibGDX的一個奇怪問題。 我在Samsung Galaxy SII上運行它。LibGDX - 由紋理造成的Android上的OpenGL異常
這裏是主要部分
package com.android.app;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
public class App extends Game{
private static TextureAtlas atlas;
@Override
public void create() {
new Texture(Gdx.files.internal("assets/textures1.png"));
}
}
下面是Android部分
package com.android.app;
import com.badlogic.gdx.backends.android.AndroidApplication;
public class AndroidApp extends AndroidApplication {
public void onCreate (android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initialize(new App(), true);
//It crasher even if OpenGL-ES 2.0 is not used
}
}
我會得到這個錯誤
的OpenGL 2.0不使用
Thread [<12> GLThread] (Suspended (exception GdxRuntimeException))
GLSurfaceViewCupcake$GLThread.run() line: 650
的OpenGL 2.0用於
Thread [<9> GLThread 10] (Suspended (exception GdxRuntimeException))
GLSurfaceView$GLThread.run() line: 1142
謝謝您的幫助
應該在GdxRuntimeException中有更多的細節。什麼是你看到的確切的日誌輸出? – 2012-03-07 22:53:14