首页 / 浏览问题 / 移动GIS / 问题详情
String index out of range: -1
7EXP 2020年05月08日
05-08 11:21:30.749 4935-4935/com.picc.nmms E/AndroidRuntime: FATAL EXCEPTION: main
                                                             Process: com.picc.nmms, PID: 4935
                                                             java.lang.RuntimeException: Unable to start activity ComponentInfo{com.picc.nmms/com.picc.nmms.nonmotorn.activity.NongMainActivity}: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
                                                                 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2984)
                                                                 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3119)
                                                                 at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
                                                                 at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
                                                                 at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
                                                                 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1839)
                                                                 at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                 at android.os.Looper.loop(Looper.java:201)
                                                                 at android.app.ActivityThread.main(ActivityThread.java:6864)
                                                                 at java.lang.reflect.Method.invoke(Native Method)
                                                                 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
                                                              Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
                                                                 at java.lang.String.substring(String.java:2036)
                                                                 at com.supermap.data.Environment$b.a(Environment.java:880)
                                                                 at com.supermap.data.Environment.initialization(Environment.java:528)
                                                                 at com.picc.nmms.nonmotorn.activity.NongMainActivity.savelicense(NongMainActivity.java:90)
                                                                 at com.picc.nmms.nonmotorn.activity.NongMainActivity.onCreated(NongMainActivity.java:81)
                                                                 at com.picc.nmmscommon.BaseActivity.onCreate(BaseActivity.java:182)
                                                                 at android.app.Activity.performCreate(Activity.java:7232)
                                                                 at android.app.Activity.performCreate(Activity.java:7221)
                                                                 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
                                                                 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2964)
                                                                 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3119)
                                                                 at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
                                                                 at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
                                                                 at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
                                                                 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1839)
                                                                 at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                 at android.os.Looper.loop(Looper.java:201)
                                                                 at android.app.ActivityThread.main(ActivityThread.java:6864)
                                                                 at java.lang.reflect.Method.invoke(Native Method)
                                                                 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
关闭重复的问题: StringIndexOutOfBoundsException
...