 <p><code>GLSurfaceView</code> is in the <code>android.opengl</code> package, not <code>android.view</code>.</p> <p>Hence, in your XML layout file, change <code>GLSurfaceView</code> to <code>android.opengl.GLSurfaceView</code>.</p>