Fragment with ViewPager inside Fragment and FragmentStatePagerAdapter results in Exception (with complete example)
问题 I have a simple Fragment with a ViewPager. I'm using the up to date support library, v4 rev18! If I show the sub fragment the first time, everything works fine, if I go back and show it again, the app crashes with the following exception: I have a complete example which shows, WHEN the following exception is occuring: java.lang.NullPointerException at android.support.v4.app.FragmentManagerImpl.getFragment(FragmentManager.java:569) at android.support.v4.app.FragmentStatePagerAdapter