使用产品:supermap imobile 10i(2021) for android
操作系统:win10 x64;手机操作系统:OPPO Color OS V7.1 (android 10)
问题详细描述:
按运行(Run)按钮后直接闪退,打不开。代码按照产品入门一步步写的。文件放置路径不太明白。目前放置了两个不同的路径如下:
第一个路径:
/mnt/sdcard/SuperMap/license/SuperMap iMobile Trial LAPTOP-36VURMTA-20220727.slm
/mnt/sdcard/SampleData/GeometryInfo/World.smwu
第二个路径:
/sdcard/SuperMap/license/SuperMap iMobile Trial LAPTOP-36VURMTA-20220727.slm
/sdcard/SampleData/GeometryInfo/World.smwu
另外按调试(Debug)按钮的时候好像总是在Environment.initialization(this);这一步闪退。
运行日志(Error部分):
2022-08-18 23:54:08.528 20125-20125/? E/xample.maptest: Unknown bits set in runtime_flags: 0x28000
2022-08-18 23:54:08.832 20125-20125/com.example.maptest4 E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.maptest4, PID: 20125
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.maptest4/com.example.maptest4.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3535)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3674)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:151)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:111)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2237)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:238)
at android.app.ActivityThread.main(ActivityThread.java:7890)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:983)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
at com.supermap.data.Environment.encryptionMac(Environment.java:2283)
at com.supermap.data.Environment.writeFile(Environment.java:2312)
at com.supermap.data.Environment.checkDevice_New(Environment.java:836)
at com.supermap.data.Environment.initialization(Environment.java:626)
at com.example.maptest4.MainActivity.onCreate(MainActivity.java:25)
at android.app.Activity.performCreate(Activity.java:7989)
at android.app.Activity.performCreate(Activity.java:7978)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3506)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3674)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:151)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:111)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2237)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:238)
at android.app.ActivityThread.main(ActivityThread.java:7890)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:983)