EGL error when trying to launch mapsActivity on Android emulator

I am trying to run the default Google Maps action on Android API 25 using the Google API and I am getting the following error:

Initialized EGL, version 1.4
04-15 11:30:25.043 3888-3937/dk.pawliux.app.mapstest D/OpenGLRenderer: Swap behavior 1
04-15 11:30:25.096 3888-3933/dk.pawliux.app.mapstest E/EGL_emulation: rcCreateContext returned 0
04-15 11:30:25.097 3888-3933/dk.pawliux.app.mapstest E/EGL_emulation: tid 3933: eglCreateContext(1284): error 0x3003 (EGL_BAD_ALLOC)
04-15 11:30:25.097 3888-3933/dk.pawliux.app.mapstest E/AndroidRuntime: FATAL EXCEPTION: GLThread 194
                                                                       Process: dk.pawliux.app.mapstest, PID: 3888
                                                                       java.lang.RuntimeException: createContext failed: 12291
                                                                           at com.google.maps.api.android.lib6.gmm6.vector.bi.a(:com.google.android.gms.DynamiteModulesB:834)
                                                                           at com.google.maps.api.android.lib6.gmm6.vector.bj.f(:com.google.android.gms.DynamiteModulesB:20825)
                                                                           at com.google.maps.api.android.lib6.gmm6.vector.bj.run(:com.google.android.gms.DynamiteModulesB:881)

      

As I can see in the merged manifest it says:

<uses-feature android:glEsVersion="0x00020000" android:required="true"/>

Does this mean that I am trying to run the application with a higher EGL than my emulator / video card support? I am using Intel HD Graphics 3000 with HAXM enabled.

As tried to run on many other google APIs and get the same thing. Even though my test app doesn't start, but the built-in Google Maps app does start and runs without issue on the emulator.

Is there a way to solve my problem?

The app works on a real device.

Thanks in advance.

+3


source to share


2 answers


Looks like I found a solution to my problem. I am posting it here in case anyone else comes across the same problem.

When creating a new emulator, you can select some parameters in the Emulated performance. It could be Automatic

, Hardware GLES

or Software GLES

. In my case, it Software GLES 2.0

did magic. Maps are a little slower, but fast enough to have the patience to try my app.

Here is a picture of the place to choose Emulation for Graphics



Graphics emulation options

I believe my graphics card is having problems with emulators.

+5


source


An alternative way to fix this is by going to the settings of the emulator itself and then changing the OpenGL ES render setting, in my case changing the Desktop Desktop OpenGL fixed the problem.

Please see the screenshot below:



Screenshot here

+2


source







All Articles