The shaders won't compile on the android emulators anymore, resulting in crashes of all maps.
08-05 16:12:33.409 1550-1550/com.mapbox.mapboxsdk.testapp E/mbgl: {pboxsdk.testapp}[Shader]: Shader failed to compile: ERROR: Valid GLSL but not GLSL ES
08-05 16:12:33.409 1550-1550/com.mapbox.mapboxsdk.testapp E/mbgl: {pboxsdk.testapp}[Shader]: Vertex shader fill failed to compile: precision highp float;
#ifdef GL_ES
precision highp float;
#else
#define lowp
#define mediump
#define highp
#endif
attribute vec2 a_pos;
uniform mat4 u_matrix;
uniform lowp vec4 u_color;
uniform lowp float u_opacity;
void main() {
lowp vec4 color = u_color;
lowp float opacity = u_opacity;
gl_Position = u_matrix * vec4(a_pos, 0, 1);
}
This can be fixed by changing your emulated graphics to Software - GLES 2.0 in your AVD settings. This is not ideal, but it will work (and is still _much_ faster than emulating an ARM device).
I suspect this is emulator specific.
@ivovandongen any updates on this?
@masterjefferson I just retested this with updates to Android Studio and I don't see the issue anymore. Can you verify?
Just tried to verify this. It worked for me on Android Studio 2.1.3, but not on 2.2-rc2.
Just confirming @ivovandongen 's finding, not getting the crash on Studio 2.1.3.
Thanks @zugaldia. I'm closing this one now than as it seems to be related to the emulators in the upcoming Android Studio release.
@ivovandongen @zugaldia Thanks for the info
This exists in 2.1.3 now with SDK Tools and Build tools upgrade. After upgrade, I have the following versions installed:
SDK Tools: 25.2.2
Platform-tools: 24.0.3
Build-tools: 24.0.2
I did not change anything in the project. It still uses:
minSdkVersion = 18
compileSdkVersion = 23
targetSdkVersion = 23
buildToolsVersion = "23.0.3"
But mapbox is now broken in all emulators.
Problem still persists in AS 2.2
SDK Tools: 25.2.2
Platform-tools: 24.0.3
Build-tools: 24.0.2
I'm leaving here a setup that works in case anyone decides to rollback the upgrade while we wait for the fix...
https://github.com/mapbox/react-native-mapbox-gl/issues/415#issuecomment-248618327
Fix has landed with https://github.com/mapbox/mapbox-gl-native/pull/7044
Most helpful comment
This exists in 2.1.3 now with SDK Tools and Build tools upgrade. After upgrade, I have the following versions installed:
SDK Tools: 25.2.2
Platform-tools: 24.0.3
Build-tools: 24.0.2
I did not change anything in the project. It still uses:
But mapbox is now broken in all emulators.