使用超图给的track案例报错

0 投票

2019-04-20 08:48:00.782 30427-30427/com.lcdx.supermap.txdw E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.lcdx.supermap.txdw, PID: 30427
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lcdx.supermap.txdw/com.lcdx.supermap.txdw.MainActivity}: java.lang.NullPointerException: Attempt to get length of null array
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2856)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2931)
        at android.app.ActivityThread.-wrap11(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1620)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:176)
        at android.app.ActivityThread.main(ActivityThread.java:6701)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:249)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)
     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.lcdx.supermap.txdw.MainActivity.onCreate(MainActivity.java:112)
        at android.app.Activity.performCreate(Activity.java:7050)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)

4月 22, 2019 分类:  472次浏览 | 用户: hjshdhasd 初出茅庐 (27 分)

1个回答

1 投票
 
已采纳
你好,报错信息是“尝试获取一个空的数组”,检查一下AndroidManifest.xml文件中是否有读取内存卡的权限,如果写了看一下开发的app在设备是是否开启了权限,在Android设备6.0系统以上需要设置动态权限。
4月 22, 2019 用户: 董懿鑫 登峰造极 (8,170 分)
采纳于 5月 24, 2019 用户:hjshdhasd
...