开发者

Make sure the surfaceView or associated SurfaceHolder has a valid Surface

I 开发者_开发百科use OpenGL in LockScreen in android 2.2. When the device run in LockScreen, it get the following error : java.lang.IllegalArgumentException: Make sure the surfaceView or associated SurfaceHolder has a valid Surface...

Does anyone know what's problem causes it? I guess the context of LockScreen is different from the context of activty, so this reason causes this problem. But I am not sure.


This error caused by the return null value of env->GetIntField(native_window, gSurface_SurfaceFieldID) function in com_google_android_gles_jni_EGLImple.cpp. Gingerbread fixed this problem. They use other method to get the window value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜