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.
https://github.com/mapbox/mapbox-android-demo 上的 MapBox 示例 在本地编译时崩溃并出现相同的错误.
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:
英特尔 x86 Atom_System 映像 API 19 修订版 22英特尔 x86 Atom_System 映像 API 23 修订版 15Intel x86 Atom_64 系统映像 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屋!