问题描述
- cocos2dx游戏安卓接入支付,出现OpenGL无context错误
-
如题,接入支付后,支付完成后按home键,再返回游戏,游戏崩溃,log表示如下04-27 09:29:32.000: E/libEGL(1721): eglMakeCurrent:684 error 3009 (EGL_BAD_MATCH) 04-27 09:29:32.000: E/libEGL(1721): call to OpenGL ES API with no current context (logged once per thread) 04-27 09:29:32.010: W/dalvikvm(1721): threadid=11: thread exiting with uncaught exception (group=0x40c1a1f8) 04-27 09:29:32.020: E/AndroidRuntime(1721): FATAL EXCEPTION: GLThread 909 04-27 09:29:32.020: E/AndroidRuntime(1721): java.lang.RuntimeException: eglSwapBuffers failed: EGL_BAD_SURFACE 04-27 09:29:32.020: E/AndroidRuntime(1721): at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1178) 04-27 09:29:32.020: E/AndroidRuntime(1721): at android.opengl.GLSurfaceView$EglHelper.swap(GLSurfaceView.java:1136) 04-27 09:29:32.020: E/AndroidRuntime(1721): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1463) 04-27 09:29:32.020: E/AndroidRuntime(1721): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)
求遇到此类问题的技术童鞋帮助
解决方案
你好,你问题解决了吗?这好像是部分手机才会的,而且按home键后activity被onDestory,然后进来后重新创建了。
时间: 2024-12-31 19:40:01