java.lang.NullPointerException

Stack Overflow | user2359958 | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

  2. 0

    NullPointerException when expanding some/most items using support library v23.2.0

    GitHub | 12 months ago | jhavatar
    java.lang.NullPointerException: Attempt to read from field 'int android.support.v7.widget.RecyclerView$ItemAnimator$ItemHolderInfo.left' 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.v7.widget.RecyclerView$Adapter.createViewHolder()
  2. Android v7
    RecyclerView.onLayout
    1. android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:5780)
    2. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5003)
    3. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4913)
    4. android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2029)
    5. android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1414)
    6. android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1377)
    7. android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:578)
    8. android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3260)
    9. android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3069)
    10. android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3518)
    10 frames
  3. Android Platform
    ViewGroup.layout
    1. android.view.View.layout(View.java:15781)
    2. android.view.ViewGroup.layout(ViewGroup.java:4884)
    3. android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
    4. android.widget.FrameLayout.onLayout(FrameLayout.java:388)
    5. android.view.View.layout(View.java:15781)
    6. android.view.ViewGroup.layout(ViewGroup.java:4884)
    7. android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
    8. android.widget.FrameLayout.onLayout(FrameLayout.java:388)
    9. android.view.View.layout(View.java:15781)
    10. android.view.ViewGroup.layout(ViewGroup.java:4884)
    11. android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
    12. android.view.View.layout(View.java:15781)
    13. android.view.ViewGroup.layout(ViewGroup.java:4884)
    13 frames
  4. android.support.design
    CoordinatorLayout.onLayout
    1. android.support.design.widget.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:120)
    2. android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42)
    3. android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1319)
    4. android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:815)
    4 frames
  5. Android Platform
    Choreographer.doFrame
    1. android.view.View.layout(View.java:15781)
    2. android.view.ViewGroup.layout(ViewGroup.java:4884)
    3. android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
    4. android.widget.FrameLayout.onLayout(FrameLayout.java:388)
    5. android.view.View.layout(View.java:15781)
    6. android.view.ViewGroup.layout(ViewGroup.java:4884)
    7. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)
    8. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531)
    9. android.widget.LinearLayout.onLayout(LinearLayout.java:1440)
    10. android.view.View.layout(View.java:15781)
    11. android.view.ViewGroup.layout(ViewGroup.java:4884)
    12. android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
    13. android.widget.FrameLayout.onLayout(FrameLayout.java:388)
    14. android.view.View.layout(View.java:15781)
    15. android.view.ViewGroup.layout(ViewGroup.java:4884)
    16. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)
    17. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531)
    18. android.widget.LinearLayout.onLayout(LinearLayout.java:1440)
    19. android.view.View.layout(View.java:15781)
    20. android.view.ViewGroup.layout(ViewGroup.java:4884)
    21. android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
    22. android.widget.FrameLayout.onLayout(FrameLayout.java:388)
    23. android.view.View.layout(View.java:15781)
    24. android.view.ViewGroup.layout(ViewGroup.java:4884)
    25. android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2361)
    26. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2074)
    27. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1256)
    28. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6658)
    29. android.view.Choreographer$CallbackRecord.run(Choreographer.java:813)
    30. android.view.Choreographer.doCallbacks(Choreographer.java:613)
    31. android.view.Choreographer.doFrame(Choreographer.java:583)
    31 frames