报错 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bestyou.myapplication/com.bestyou.myapplication.MapActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'com.supermap.data.Datasets com.supermap.data.Datasource.getDatasets()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4060) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4247) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2613) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:219) at android.app.ActivityThread.main(ActivityThread.java:8668) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.supermap.data.Datasets com.supermap.data.Datasource.getDatasets()' on a null object reference at com.bestyou.myapplication.MapActivity.initialize(MapActivity.java:276) at com.bestyou.myapplication.MapActivity.onCreate(MapActivity.java:141) at android.app.Activity.performCreate(Activity.java:8214) at android.app.Activity.performCreate(Activity.java:8202) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1320) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4033) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4247) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2613) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:219) at android.app.ActivityThread.main(ActivityThread.java:8668)