公共场景onCreateScene(){ this.mEngine.registerUpdateHandler(new FPSLogger()); final场景=新场景(); scene.getBackground()。setColor(Color.YELLOW); final float centerX = CAMERA_WIDTH / 2; final float centerY = CAMERA_HEIGHT / 2 ; final Sprite sprite = new Sprite(centerX,centerY, this.mHelloWorldTextureRegion,this.getVertexBufferObjectManager()); scene.attachChild (精灵); 返回场景; } } 这里是logcat: ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):在/data/app-lib/your.packhage.namespace-1/libandengine.so 0x416ecf98中找不到JNI_OnLoad,跳过init ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):跳过48帧!应用程序可能在其主线程上做了太多工作。 ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):[07-02 07:41:19.986 1288:1288 D / gralloc_goldfish] ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):未检测到GPU仿真的仿真器。 ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):[07-02 07:41:19.996 1288:1304 W / dalvikvm] ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):threadid = 13:线程退出未捕获的异常(组= 0x41465700) ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):[07-02 07:41:20.006 1288:1304 E / AndroidRuntime] ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):致命异常:GLThread 117 ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):java.lang.IllegalArgumentException:找不到EGLConfig! ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):org.andengine.opengl.view.ConfigChooser.chooseConfig(ConfigChooser.java:229) ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):org.andengine.opengl.view.ConfigChooser.chooseConfig(ConfigChooser.java:203) ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):在android.opengl.GLSurfaceView $ EglHelper.start(GLSurfaceView.java:1024) ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):在android.opengl.GLSurfaceView $ GLThread.guardedRun(GLSurfaceView.java:1401) ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):在android.opengl.GLSurfaceView $ GLThread.run(GLSurfaceView.java:1240) ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):[07-02 07:41:20.036 285:530 W / ActivityManager] i tried making an android app with andengine and i used eclipse for it ,but when i run it, it shows the message "unfortunately,app has stopped". what is the reason? here is the java code:package your.packhage.namespace;import java.io.IOException;import org.andengine.engine.camera.Camera;import org.andengine.engine.options.EngineOptions;import org.andengine.engine.options.ScreenOrientation;import org.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy;import org.andengine.entity.scene.Scene;import org.andengine.entity.sprite.Sprite;import org.andengine.entity.util.FPSLogger;import org.andengine.opengl.texture.ITexture;import org.andengine.opengl.texture.bitmap.AssetBitmapTexture;import org.andengine.opengl.texture.region.ITextureRegion;import org.andengine.opengl.texture.region.TextureRegionFactory;import org.andengine.ui.activity.SimpleBaseGameActivity;import org.andengine.util.adt.color.Color;public class GgActivity extends SimpleBaseGameActivity { private static final int CAMERA_WIDTH = 800; private static final int CAMERA_HEIGHT = 480; private ITexture mHelloWorldTexture; private ITextureRegion mHelloWorldTextureRegion; @Override public EngineOptions onCreateEngineOptions() { final Camera camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT); return new EngineOptions(true, ScreenOrientation.LANDSCAPE_SENSOR, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), camera); } @Override public void onCreateResources() throws IOException { this.mHelloWorldTexture = new AssetBitmapTexture(this.getTextureManager(), this.getAssets(), "helloworld.png"); this.mHelloWorldTextureRegion = TextureRegionFactory.extractFromTexture( this.mHelloWorldTexture); this.mHelloWorldTexture.load(); } @Override public Scene onCreateScene() { this.mEngine.registerUpdateHandler(new FPSLogger()); final Scene scene = new Scene(); scene.getBackground().setColor(Color.YELLOW); final float centerX = CAMERA_WIDTH / 2; final float centerY = CAMERA_HEIGHT / 2; final Sprite sprite = new Sprite(centerX, centerY, this.mHelloWorldTextureRegion, this.getVertexBufferObjectManager()); scene.attachChild(sprite); return scene; }}here is the logcat:??-?? ??:??:??.???: INFO/<unknown>(<unknown>): No JNI_OnLoad found in /data/app-lib/your.packhage.namespace-1/libandengine.so 0x416ecf98, skipping init??-?? ??:??:??.???: INFO/<unknown>(<unknown>): Skipped 48 frames! The application may be doing too much work on its main thread.??-?? ??:??:??.???: INFO/<unknown>(<unknown>): [ 07-02 07:41:19.986 1288: 1288 D/gralloc_goldfish ]??-?? ??:??:??.???: INFO/<unknown>(<unknown>): Emulator without GPU emulation detected.??-?? ??:??:??.???: INFO/<unknown>(<unknown>): [ 07-02 07:41:19.996 1288: 1304 W/dalvikvm ]??-?? ??:??:??.???: INFO/<unknown>(<unknown>): threadid=13: thread exiting with uncaught exception (group=0x41465700)??-?? ??:??:??.???: INFO/<unknown>(<unknown>): [ 07-02 07:41:20.006 1288: 1304 E/AndroidRuntime ]??-?? ??:??:??.???: INFO/<unknown>(<unknown>): FATAL EXCEPTION: GLThread 117??-?? ??:??:??.???: INFO/<unknown>(<unknown>): java.lang.IllegalArgumentException: No EGLConfig found!??-?? ??:??:??.???: INFO/<unknown>(<unknown>): at org.andengine.opengl.view.ConfigChooser.chooseConfig(ConfigChooser.java:229)??-?? ??:??:??.???: INFO/<unknown>(<unknown>): at org.andengine.opengl.view.ConfigChooser.chooseConfig(ConfigChooser.java:203)??-?? ??:??:??.???: INFO/<unknown>(<unknown>): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1024)??-?? ??:??:??.???: INFO/<unknown>(<unknown>): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1401)??-?? ??:??:??.???: INFO/<unknown>(<unknown>): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)??-?? ??:??:??.???: INFO/<unknown>(<unknown>): [ 07-02 07:41:20.036 285: 530 W/ActivityManager ]推荐答案 EglHelper.start(GLSurfaceView.java:1024) ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):在android.opengl.GLSurfaceView EglHelper.start(GLSurfaceView.java:1024)??-?? ??:??:??.???: INFO/<unknown>(<unknown>): at android.opengl.GLSurfaceView GLThread.guardedRun(GLSurfaceView.java :1401) ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):在android.opengl.GLSurfaceView GLThread.guardedRun(GLSurfaceView.java:1401)??-?? ??:??:??.???: INFO/<unknown>(<unknown>): at android.opengl.GLSurfaceView GLThread.run(GLSurfaceView.java :1240) ?? - ?? ??:??:??。???:INFO /< unknown>(< unknown>):[07-02 07:41:20.036 285:530 W / ActivityManager] GLThread.run(GLSurfaceView.java:1240)??-?? ??:??:??.???: INFO/<unknown>(<unknown>): [ 07-02 07:41:20.036 285: 530 W/ActivityManager ] 这篇关于“该应用已意外停止”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-11 01:03