java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.app.FragmentManagerImpl.performPendingDeferredStart(android.support.v4.app.Fragment)' on a null object reference

Stack Overflow | Kacy Raye | 2 months ago
  1. 0

    FragmentManager is null after creating Fragment

    Stack Overflow | 2 months ago | Kacy Raye
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.app.FragmentManagerImpl.performPendingDeferredStart(android.support.v4.app.Fragment)' on a null object reference
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

    5 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'void android.support.v4.app.FragmentManagerImpl.performPendingDeferredStart(android.support.v4.app.Fragment)' on a null object reference

      at android.support.v4.app.FragmentPagerAdapter.setPrimaryItem()
    2. Android Support v4
      ViewPager.setCurrentItem
      1. android.support.v4.app.FragmentPagerAdapter.setPrimaryItem(FragmentPagerAdapter.java:130)
      2. android.support.v4.view.ViewPager.populate(ViewPager.java:1175)
      3. android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:608)
      4. android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:570)
      5. android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:551)
      5 frames
    3. fragments
      CategoryActivityFragment.onCategoryClicked
      1. fragments.CategoryActivityFragment.onCategoryClicked(CategoryActivityFragment.java:56)
      1 frame
    4. adapters
      CategoriesAdapter$1.onClick
      1. adapters.CategoriesAdapter$1.onClick(CategoriesAdapter.java:84)
      1 frame
    5. Android Platform
      ActivityThread.main
      1. android.view.View.performClick(View.java:5207)
      2. android.view.View$PerformClick.run(View.java:21168)
      3. android.os.Handler.handleCallback(Handler.java:746)
      4. android.os.Handler.dispatchMessage(Handler.java:95)
      5. android.os.Looper.loop(Looper.java:148)
      6. android.app.ActivityThread.main(ActivityThread.java:5443)
      6 frames
    6. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    7. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
      2 frames