androidarcgis-runtimearcgis-android-api

java.lang.RuntimeException: createContext failed: EGL_SUCCESS Arcgis Android


When I start the activity which have Arcgis MapView the app crashes all the time but on specific devices such as Letv Le X509 device or xiaomi device. The log which I'm getting is mentioned below. Device OS Version is 6.0.

My ArcGIS SDK version is 100.3.0

Fatal Exception: java.lang.RuntimeException: createContext failed: EGL_SUCCESS at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1233) at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1224) at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1074) at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1447) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1286)


Solution

  • Unfortunately you might have a device that doesn't work with ArcGIS Runtime. See this forum thread:

    https://community.esri.com/thread/186730-error-createcontext-failed-eglsuccess-when-under-android-422-application-is-started

    This is a known issue for this release that has not found its way into the release notes yet, we will update the release notes soon.

    The issue is that some devices do not correctly report their OpenGL configurations to allow us to create our OpenGL context. We need to be specific in creating the OpenGL context to allow many of our map rendering features to work properly (particularly for things like Vector Tiled Layers). We have implemented a solution which works on most devices, but it will still be problematic on some, especially older devices running older versions of Android.

    Please try on another device or the emulator.