java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nextgis.mobile/com.nextgis.mobile.activity.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences com.nextgis.maplib.map.VectorLayer.getPreferences()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2521)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2595)
at android.app.ActivityThread.access$800(ActivityThread.java:178)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5624)
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:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences com.nextgis.maplib.map.VectorLayer.getPreferences()' on a null object reference
at com.nextgis.mobile.fragment.MapFragment.defineMenuItems(MapFragment.java:475)
at com.nextgis.mobile.fragment.MapFragment.setMode(MapFragment.java:464)
at com.nextgis.mobile.fragment.MapFragment.onViewStateRestored(MapFragment.java:831)
at android.support.v4.app.Fragment.restoreViewState(Fragment.java:475)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1105)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1259)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1241)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2053)
at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:165)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:543)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1244)
at android.app.Activity.performStart(Activity.java:6108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2478)
... 10 more