我正在尝试SKCoordinates
在. 表演时SKMapSurfaceview
SKPolyline
SKSurfaceView.addPolyline( SKPolyline )
我从 libc 收到致命信号 6 SIGABRT。
MapActivity.java
public class MapActivity extends BaseRouteActivity
{
...
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
SKMapSurfaceView mapView = SKMapViewHolder mapHolder = (SKMapViewHolder)
findViewById(map_target);
mapView = mapHolder.getMapSurfaceView();
mapView.setMapSurfaceListener(this);
List<SKCoordinate> coordinates = new ArrayList<SKCoordinate>();
coordinates.add( new SKCoordinate( 52.390846319385254, 4.643051476057394 ) );
coordinates.add( new SKCoordinate( 52.391088576419605, 4.643212408598288 ) );
SKPolyline polyline = new SKPolyline();
polyline.setNodes(coordinates);
mapView.addPolyline(polyline);
}
...
}
Logcat 错误
8009-8009/com.my.app A/libc﹕ Fatal signal 6 (SIGABRT) at 0x00001f49 (code=-6), thread 8009 (y.app)
addPolyline
自从我读到Android会杀死UI阻塞功能中的所有网络流量后,我就尝试将其包装起来UIThread/AsyncTask
,但无济于事。
我错过了什么?
编辑#1:在 LogCat 中进行更多挖掘后,我收到此错误:
JNI WARNING: GetFloatArrayElements received null array
in Lcom/skobbler/ngx/map/MapRenderer;.addobjectpolyline:([D[D[F[FIIII)I (GetFloatArrayElements)