here is thoow err code:``` java.lang.NullPointerException at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:1629) at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:679) at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:143) at android.support.v4.view.ViewPager.populate(ViewPager.java:1240) at android.support.v4.view.ViewPager.populate(ViewPager.java:1088) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1614) at android.view.View.measure(View.java:16525) at android.widget.LinearLayout.measureVertical(LinearLayout.java:847) at android.widget.LinearLayout.onMeasure(LinearLayout.java:588) at android.view.View.measure(View.java:16525) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135) at android.view.View.measure(View.java:16525) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404) at android.widget.LinearLayout.measureVertical(LinearLayout.java:695) at android.widget.LinearLayout.onMeasure(LinearLayout.java:588) at android.view.View.measure(View.java:16525) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at android.view.View.measure(View.java:16525) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404) at android.widget.LinearLayout.measureVertical(LinearLayout.java:695) at android.widget.LinearLayout.onMeasure(LinearLayout.java:588) at android.view.View.measure(View.java:16525) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2291) at android.view.View.measure(View.java:16525) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1962) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1159) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1341) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1046) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5655) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761) at android.view.Choreographer.doCallbacks(Choreographer.java:574) at android.view.Choreographer.doFrame(Choreographer.java:544) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5113) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612) at dalvik.system.NativeStart.main(Native Method)
finally i found [this](https://code.google.com/p/android/issues/detail?id=216157) at google bug report.finally i just do nothing...
finally:
后来发现.原来手机中的开发者模式里面的不保留活动(用户离开后即销毁每个活动).
Dont keep activities in Developer options is on,finally i turn off it,and happy end.
and found this code
@Override protected void onDestroy() { Log.d(TAG, "onDestroy"); try { super.onDestroy(); } catch (NullPointerException npe) { Log.e(TAG, "NPE: Bug workaround"); }
文章评论(0)