I am modifying the version of the android version of the 2d texture example from OpenGl ES2.0 programming guide to change the fragment shader. this is written in pure Java a
I had the same problem.
Make sure you have the following in ApplicationManufest.xml:
Call this after initializing a GLSurfaceView
glSurfaceView.SetEGLContextClientVersion(2);