title: App crashes when back after a period of time(Press home)
body: <p>If the app runs visible,everything gets fine.But if I press home to let the app in the background and do some other things, it would get a crash like this:</p>
  
  <pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{com.qdn.bus/com.qdn.activity.MainActivity}: java.lang.NullPointerException
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2001)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2028)
      at android.app.ActivityThread.access$600(ActivityThread.java:127)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1179)
      at android.os.Handler.dispatchMessage(Handler.java:99)
      at android.os.Looper.loop(Looper.java:137)
      at android.app.ActivityThread.main(ActivityThread.java:4508)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:511)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
      at dalvik.system.NativeStart.main(Native Method)
  Caused by: java.lang.NullPointerException
      at android.view.View.onRestoreInstanceState(View.java:9999)
      at android.support.v4.view.ViewPager.onRestoreInstanceState(Unknown Source)
      at android.view.View.dispatchRestoreInstanceState(View.java:9975)
      at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2397)
      at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
      at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
      at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
      at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
      at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
      at android.view.View.restoreHierarchyState(View.java:9951)
      at android.support.v4.app.Fragment.restoreViewState(Unknown Source)
      at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
      at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
      at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
      at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(Unknown Source)
      at android.support.v4.app.FragmentActivity.onStart(Unknown Source)
      at com.qdn.activity.MainActivity.onStart(Unknown Source)
      at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1136)
      at com.lbe.security.service.core.client.b.x.callActivityOnStart(Unknown Source)
      at android.app.Activity.performStart(Activity.java:4489)
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
      ... 11 more
  java.lang.NullPointerException
      at android.view.View.onRestoreInstanceState(View.java:9999)
      at android.support.v4.view.ViewPager.onRestoreInstanceState(Unknown Source)
      at android.view.View.dispatchRestoreInstanceState(View.java:9975)
      at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2397)
      at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
      at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
      at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
      at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
      at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
      at android.view.View.restoreHierarchyState(View.java:9951)
      at android.support.v4.app.Fragment.restoreViewState(Unknown Source)
      at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
      at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
      at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
      at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(Unknown Source)
      at android.support.v4.app.FragmentActivity.onStart(Unknown Source)
      at com.qdn.activity.MainActivity.onStart(Unknown Source)
      at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1136)
      at com.lbe.security.service.core.client.b.x.callActivityOnStart(Unknown Source)
      at android.app.Activity.performStart(Activity.java:4489)
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2028)
      at android.app.ActivityThread.access$600(ActivityThread.java:127)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1179)
      at android.os.Handler.dispatchMessage(Handler.java:99)
      at android.os.Looper.loop(Looper.java:137)
      at android.app.ActivityThread.main(ActivityThread.java:4508)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:511)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
      at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p><br>
  I think it is because the Delvik Vm has recycle some of the memory.But is there anyway to fix it?</p>