最近测试游戏的兼容性发现一些问题,分别用hellolua和我的游戏在testin的云测试网站,分别测试了130款Android手机,发现有20%左右的手机是无法启动的。打印的log为:
其一:
#109-0823:52:01.922E/AndroidRuntime(5535):FATALEXCEPTION:GLThread401#209-0823:52:01.922E/AndroidRuntime(5535):java.lang.RuntimeException:createContextfailed:EGL_BAD_CONFIG#309-0823:52:01.922E/AndroidRuntime(5535):atandroid.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1219)#409-0823:52:01.922E/AndroidRuntime(5535):atandroid.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1210)#509-0823:52:01.922E/AndroidRuntime(5535):atandroid.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1060)#609-0823:52:01.922E/AndroidRuntime(5535):atandroid.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1427)#709-0823:52:01.922E/AndroidRuntime(5535):atandroid.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1266)其二:
#109-0823:51:44.584E/AndroidRuntime(7905):FATALEXCEPTION:GLThread413#209-0823:51:44.584E/AndroidRuntime(7905):java.lang.RuntimeException:createContextfailed:EGL_SUCCESS#309-0823:51:44.584E/AndroidRuntime(7905):atandroid.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1193)#409-0823:51:44.584E/AndroidRuntime(7905):atandroid.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1184)#509-0823:51:44.584E/AndroidRuntime(7905):atandroid.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1034)#609-0823:51:44.584E/AndroidRuntime(7905):atandroid.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1401)#709-0823:51:44.584E/AndroidRuntime(7905):atandroid.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
郁闷的是cocos2dx C++写的游戏没有这样的兼容问题。有遇到过或有解决办法的朋友,麻烦告知下,先谢谢了