当我运行我的AndEngine程序时,我在手机上收到这样的错误
它在我的frnds手机上成功运行,但当我试图运行时,我收到错误,如检测到固有的不兼容设备…
它在我的frnds手机上成功运行,但当我试图运行时,我收到错误,如检测到固有的不兼容设备…
我的logcat在下面
10-16 14:13:23.061: E/AndroidRuntime(4533): FATAL EXCEPTION: GLThread 10 10-16 14:13:23.061: E/AndroidRuntime(4533): java.lang.ExceptionInInitializerError 10-16 14:13:23.061: E/AndroidRuntime(4533): at org.andengine.opengl.vbo.attribute.VertexBufferObjectAttributeFix.glVertexAttribPointer(VertexBufferObjectAttributeFix.java:39) 10-16 14:13:23.061: E/AndroidRuntime(4533): at org.andengine.opengl.vbo.attribute.VertexBufferObjectAttributes.glVertexAttribPointers(VertexBufferObjectAttributes.java:50) 10-16 14:13:23.061: E/AndroidRuntime(4533): at org.andengine.opengl.shader.ShaderProgram.bind(ShaderProgram.java:126) 10-16 14:13:23.061: E/AndroidRuntime(4533): at org.andengine.opengl.shader.PositionTextureCoordinatesShaderProgram.bind(PositionTextureCoordinatesShaderProgram.java:86) 10-16 14:13:23.061: E/AndroidRuntime(4533): at org.andengine.opengl.vbo.VertexBufferObject.bind(VertexBufferObject.java:162) 10-16 14:13:23.061: E/AndroidRuntime(4533): at org.andengine.opengl.texture.TextureWarmUpVertexBufferObject.warmup(TextureWarmUpVertexBufferObject.java:97) 10-16 14:13:23.061: E/AndroidRuntime(4533): at org.andengine.opengl.texture.TextureManager.updateTextures(TextureManager.java:257) 10-16 14:13:23.061: E/AndroidRuntime(4533): at org.andengine.engine.Engine.onDrawFrame(Engine.java:613) 10-16 14:13:23.061: E/AndroidRuntime(4533): at org.andengine.opengl.view.EngineRenderer.onDrawFrame(EngineRenderer.java:105) 10-16 14:13:23.061: E/AndroidRuntime(4533): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1332) 10-16 14:13:23.061: E/AndroidRuntime(4533): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116) 10-16 14:13:23.061: E/AndroidRuntime(4533): Caused by: org.andengine.util.exception.AndEngineRuntimeException: Inherently incompatible device detected. 10-16 14:13:23.061: E/AndroidRuntime(4533): at org.andengine.opengl.GLES20Fix.<clinit>(GLES20Fix.java:39)
解决方法
与
stated here by 42labs一样:
Luckily it is very easy to fix – in your sources root (the directory
where AndroidManifest.xml is) make a directory named libs inside which
then make a directory named armeabi. Now get AndEnginesources (from an
OpenGL ES 2.0 branch) – 07001. You can clone the repository
or download it. Doesn’t matter.What matters is that you should copy the libandengine.so available there in libs/armeabi to the libs/armeabi you have just created in
your directory. Will fix the issue