MapBox Android应用程序在更新到模拟器上的SDK 4.1.0后崩溃 [英] MapBox Android application crashes after update to SDK 4.1.0 on emulator
问题描述
Android MapBox SDK 4.1.0 / 4.1.1更新后,我的应用程式在Android模拟器上发生崩溃:
After the update to Android MapBox SDK 4.1.0/4.1.1 my app crashes on Android emulator with:
E/mbgl: [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;
void main() {
gl_Position = u_matrix * vec4(a_pos, 0, 1);
}
07-23 00:07:06.818 8965-8965/? A/libc: Fatal signal 11 (SIGSEGV) at 0xdeadcab1 (code=1), thread 8965 (pboxandroiddemo)
该应用程序在Android物理设备上运行时不会崩溃,并且在使用MapBox SDK 4.0.0编译时运行。
The app runs without crash on Android physical devices and when compiled with MapBox SDK 4.0.0.
MapBox示例在 https://github.com/mapbox/mapbox-android-demo 在本地编译时会出现相同的错误。
MapBox example on https://github.com/mapbox/mapbox-android-demo crashes with the same error when compiled locally.
在Linux Mint上测试以下图像:
Tested on Linux Mint with following images:
Intel x86 Atom_System Image API 19版本22
Intel x86 Atom_System Image API 23修订15
Intel x86 Atom_64 System Image API 24修订版5
Intel x86 Atom_System Image API 19 Revision 22 Intel x86 Atom_System Image API 23 Revision 15 Intel x86 Atom_64 System Image API 24 Revision 5
这是已知的问题吗?这种崩溃会影响物理设备上的生产构建吗?是否有任何解决方法?
Is this known problem? Can this crash affect production build on physical devices? Is there any workaround?
推荐答案
对于使用模拟器的用户:
For those using the emulator:
这可以通过在AVD设置中将模拟图形更改为 Software - GLES 2.0
来修复。这不是理想的,但它会工作(并且仍然比模拟ARM设备更快)。
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.
这篇关于MapBox Android应用程序在更新到模拟器上的SDK 4.1.0后崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!