java.lang.NullPointerException

Stack Overflow | Aliya | 5 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

  2. 0

    NullPointerException on setMenuVisibility

    Stack Overflow | 10 months ago | MAOL
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.app.Fragment.setMenuVisibility(boolean)' on a null object reference
  3. 0

    Fatal Exception: java.lang.NullPointerException while using ViewPager

    Stack Overflow | 10 months ago | user669231
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.os.Handler android.support.v4.app.FragmentHostCallback.getHandler()' on a null object reference
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

    No message provided

    at android.support.v4.app.FragmentPagerAdapter.instantiateItem()
  2. Android Support v4
    ViewPager.onMeasure
    1. android.support.v4.app.FragmentPagerAdapter.instantiateItem(FragmentPagerAdapter.java:89)
    2. android.support.v4.view.ViewPager.addNewItem(ViewPager.java:1006)
    3. android.support.v4.view.ViewPager.populate(ViewPager.java:1154)
    4. android.support.v4.view.ViewPager.populate(ViewPager.java:1088)
    5. android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1614)
    5 frames
  3. Android Platform
    ViewGroup.measureChildWithMargins
    1. android.view.View.measure(View.java:15848)
    2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
    2 frames
  4. android.support.design
    CoordinatorLayout.onMeasure
    1. android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:700)
    2. android.support.design.widget.HeaderScrollingViewBehavior.onMeasureChild(HeaderScrollingViewBehavior.java:90)
    3. android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onMeasureChild(AppBarLayout.java:1364)
    4. android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:765)
    4 frames
  5. Android Platform
    ViewGroup.measureChildWithMargins
    1. android.view.View.measure(View.java:15848)
    2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
    3. android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    4. android.view.View.measure(View.java:15848)
    5. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
    5 frames
  6. android.support.design
    CoordinatorLayout.onMeasure
    1. android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:700)
    2. android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:767)
    2 frames
  7. Android Platform
    View.measure
    1. android.view.View.measure(View.java:15848)
    1 frame
  8. Android Support v4
    DrawerLayout.onMeasure
    1. android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:1085)
    1 frame
  9. Android Platform
    FrameLayout.onMeasure
    1. android.view.View.measure(View.java:15848)
    2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
    3. android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    3 frames
  10. Android v7
    ContentFrameLayout.onMeasure
    1. android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)
    1 frame
  11. Android Platform
    FrameLayout.onMeasure
    1. android.view.View.measure(View.java:15848)
    2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
    3. android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
    4. android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
    5. android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
    6. android.view.View.measure(View.java:15848)
    7. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
    8. android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    9. android.view.View.measure(View.java:15848)
    10. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
    11. android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
    12. android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
    13. android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
    14. android.view.View.measure(View.java:15848)
    15. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
    16. android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    16 frames
  12. Android
    PhoneWindow$DecorView.onMeasure
    1. com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2189)
    1 frame
  13. Android Platform
    ActivityThread.main
    1. android.view.View.measure(View.java:15848)
    2. android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1905)
    3. android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1104)
    4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1284)
    5. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1004)
    6. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5481)
    7. android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
    8. android.view.Choreographer.doCallbacks(Choreographer.java:562)
    9. android.view.Choreographer.doFrame(Choreographer.java:532)
    10. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
    11. android.os.Handler.handleCallback(Handler.java:730)
    12. android.os.Handler.dispatchMessage(Handler.java:92)
    13. android.os.Looper.loop(Looper.java:137)
    14. android.app.ActivityThread.main(ActivityThread.java:5103)
    14 frames
  14. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:525)
    2 frames
  15. Android
    ZygoteInit$MethodAndArgsCaller.run
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
    1 frame