我导入运行的是室内导航的范例,为什么会这样报错呢?我运行其他范例的时候也会这样报错
Environment.initialization(this);//报错的就是这行
Caused by: java.lang.NullPointerException: Attempt to get length of null array
at com.supermap.data.Environment.checkAndLoadLibrary64(Environment.java:1632)
at com.supermap.data.Environment.initialization(Environment.java:576)
at com.supermap.indoornavigation.MainActivity.onCreate(MainActivity.java:117)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//不使用OpenGL模式显示
Environment.setOpenGLMode(false);
//设置许可文件路径
Environment.setLicensePath(sdcard + "/SuperMap/license/");
//组件功能必须在 Environment 初始化之后才能调用
Environment.initialization(this);//报错的就是
setContentView(R.layout.activity_main);
//打开工作空间
m_wokspace = new Workspace();
WorkspaceConnectionInfo info = new WorkspaceConnectionInfo();
info.setServer(sdcard+"/SampleData/IndoorNavigationData/beijing.smwu");
info.setType(WorkspaceType.SMWU);
m_wokspace.open(info);
//将地图显示控件和工作空间关联
m_mapView = (MapView)findViewById(R.id.Map_view);
m_mapControl = m_mapView.getMapControl();
m_mapControl.getMap().setWorkspace(m_wokspace);