【发布时间】:2016-08-04 14:08:12
【问题描述】:
尝试在我的应用中加载 MapBox 视图时出现此错误。我的代码有问题吗?
测试信息:
Nexus 5X (API 23) Android 6.0 x86_64 模拟器,Android Studio 2.2 Preview 7 (Mac)
分级:
compile('com.mapbox.mapboxsdk:mapbox-android-sdk:4.1.1@aar') {
transitive = true
}
地图活动:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
MapboxAccountManager.start(this, getString(R.string.accessToken));
// Create a mapView
mapView = (MapView) findViewById(R.id.mapview);
// Doesn't work without using deprecated setAccessToken... bug??
mapView.setAccessToken(getString(R.string.accessToken));
mapView.getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(MapboxMap mapboxMap) {
}
});
mapView.onCreate(savedInstanceState);
}
XML:
<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
mapbox:style_url="@string/style_mapbox_streets"
mapbox:center_latitude="41.885"
mapbox:center_longitude="-87.679"
mapbox:zoom="12"
mapbox:tilt="20" />
日志:
E/mbgl: [Shader]: Shader failed to compile: ERROR: Valid GLSL but not GLSL ES
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);
}
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xdeadcab1 in tid 22621
【问题讨论】:
-
另外,请编辑您的测试信息(例如,设备与模拟器、arm 与 x86)。
-
@RobLabs 更新了信息
-
doovers — 谢谢。是的,我认为这与提到的相似/重复。我和你有同样的设置,我得到了同样的错误。手臂设备工作正常。我已经回滚到 4.0.0,所以我可以在模拟器上测试。
-
@RobLabs 好的,我现在将与 Arm 合作,所以...你知道这个问题在 GitHub 上被跟踪吗?