eglChooseConfig failed with EGL_SUCCESS on Android 4.1 (Ouya)

When I try to create a window on and old Ouya that runs Android 4.1 and a Tegra 3, I get the following error:

Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)

I’m calling SDL_CreateWindow like this:

SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL);

I’m using SDL 2.0.12.

Is this a bug? How can eglChooseConfig fail with an error of “success”?

You have to use SDL 2.0.8 or lower to target Ouya (android 4.2 API 16)… at least that’s what the doc’s say.