Android: Error in AndEngine

青春壹個敷衍的年華 提交于 2019-12-24 10:36:52

问题


I am trying to learn game programming in Android. I have set GPU emulation in the AVD to "yes" and the AndEngine library version to be 4.1

I have also set the version of project be 4.1 but still the following error occurs please help me.

I am using the sample code for tower of hanoi.

E/AndroidRuntime(698):  at org.andengine.opengl.view.ConfigChooser.chooseConfig(ConfigChooser.java:183)
D/gralloc_goldfish(786): Emulator without GPU emulation detected.
E/AndroidRuntime(786): FATAL EXCEPTION: GLThread 101
E/AndroidRuntime(786): java.lang.IllegalArgumentException: No EGLConfig found!
E/AndroidRuntime(786):  at org.andengine.opengl.view.ConfigChooser.chooseConfig(ConfigChooser.java:183)
E/AndroidRuntime(786):  at org.andengine.opengl.view.ConfigChooser.chooseConfig(ConfigChooser.java:157)
E/AndroidRuntime(786):  at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1009)
E/AndroidRuntime(786):  at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1362)
E/AndroidRuntime(786):  at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)

回答1:


You can use this method org.andengine.AndEngine.IsDeviceSupported(), to check if your device is supported.
If you have a ancient graphics card, you can not enable GPU emulation forever.
See this thread's 1st post, section 'TIPS AND TRICKS' for detail.



来源:https://stackoverflow.com/questions/12798089/android-error-in-andengine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!