java.lang.NullPointerException: Attempt to invoke virtual method 'int android.support.v7.widget.RecyclerView$LayoutManager.getChildCount()' on a null object reference

GitHub | zeshaoaaa | 3 months ago
  1. 0

    NullPointerException

    GitHub | 3 months ago | zeshaoaaa
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.support.v7.widget.RecyclerView$LayoutManager.getChildCount()' on a null object reference
  2. 0

    GitHub comment 65#94284404

    GitHub | 2 years ago | 471448446
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.support.v7.widget.RecyclerView$LayoutManager.onAddFocusables(android.support.v7.widget.RecyclerView, java.util.ArrayList, int, int)' on a null object reference
  3. 0

    NullPointerException using VerticalGridView.FOCUS_SCROLL_PAGE in VerticalGridView to scroll item in page

    Stack Overflow | 11 months ago | lowwor
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.support.v7.widget.RecyclerView$State.getItemCount()' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    NullPointerException: Attempt to invoke virtual method 'int android.support.v7.widget.RecyclerView$ViewHolder.getLayoutPosition()' on a null object reference

    GitHub | 4 months ago | rusmichal
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.support.v7.widget.RecyclerView$ViewHolder.getLayoutPosition()' on a null object reference
  6. 0

    Recycler View crash on destroy

    GitHub | 1 year ago | thefex
    java.lang.NullPointerException: Attempt to invoke virtual method 'int android.support.v7.widget.RecyclerView$Adapter.getItemCount()' 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

      Attempt to invoke virtual method 'int android.support.v7.widget.RecyclerView$LayoutManager.getChildCount()' on a null object reference

      at com.marshalchen.ultimaterecyclerview.uiUtils.RecyclerViewPositionHelper.findFirstVisibleItemPosition()
    2. com.marshalchen.ultimaterecyclerview
      UltimateRecyclerView$2.onScrolled
      1. com.marshalchen.ultimaterecyclerview.uiUtils.RecyclerViewPositionHelper.findFirstVisibleItemPosition(RecyclerViewPositionHelper.java:50)
      2. com.marshalchen.ultimaterecyclerview.UltimateRecyclerView.scroll_load_more_detection(UltimateRecyclerView.java:436)
      3. com.marshalchen.ultimaterecyclerview.UltimateRecyclerView.access$300(UltimateRecyclerView.java:61)
      4. com.marshalchen.ultimaterecyclerview.UltimateRecyclerView$2.onScrolled(UltimateRecyclerView.java:498)
      4 frames
    3. Android v7
      RecyclerView.onLayout
      1. android.support.v7.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:4250)
      2. android.support.v7.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:3348)
      3. android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3080)
      4. android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3518)
      4 frames
    4. Android Platform
      ViewGroup.layout
      1. android.view.View.layout(View.java:16001)
      2. android.view.ViewGroup.layout(ViewGroup.java:5181)
      2 frames
    5. Android Support v4
      SwipeRefreshLayout.onLayout
      1. android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:598)
      1 frame
    6. Android Platform
      ViewRootImpl.doTraversal
      1. android.view.View.layout(View.java:16001)
      2. android.view.ViewGroup.layout(ViewGroup.java:5181)
      3. android.widget.RelativeLayout.onLayout(RelativeLayout.java:1195)
      4. android.view.View.layout(View.java:16001)
      5. android.view.ViewGroup.layout(ViewGroup.java:5181)
      6. android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
      7. android.widget.FrameLayout.onLayout(FrameLayout.java:574)
      8. android.view.View.layout(View.java:16001)
      9. android.view.ViewGroup.layout(ViewGroup.java:5181)
      10. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
      11. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
      12. android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
      13. android.view.View.layout(View.java:16001)
      14. android.view.ViewGroup.layout(ViewGroup.java:5181)
      15. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
      16. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
      17. android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
      18. android.view.View.layout(View.java:16001)
      19. android.view.ViewGroup.layout(ViewGroup.java:5181)
      20. android.widget.RelativeLayout.onLayout(RelativeLayout.java:1195)
      21. android.view.View.layout(View.java:16001)
      22. android.view.ViewGroup.layout(ViewGroup.java:5181)
      23. android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
      24. android.widget.FrameLayout.onLayout(FrameLayout.java:574)
      25. android.view.View.layout(View.java:16001)
      26. android.view.ViewGroup.layout(ViewGroup.java:5181)
      27. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
      28. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
      29. android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
      30. android.view.View.layout(View.java:16001)
      31. android.view.ViewGroup.layout(ViewGroup.java:5181)
      32. android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
      33. android.widget.FrameLayout.onLayout(FrameLayout.java:574)
      34. android.view.View.layout(View.java:16001)
      35. android.view.ViewGroup.layout(ViewGroup.java:5181)
      36. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959)
      37. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813)
      38. android.widget.LinearLayout.onLayout(LinearLayout.java:1722)
      39. android.view.View.layout(View.java:16001)
      40. android.view.ViewGroup.layout(ViewGroup.java:5181)
      41. android.widget.FrameLayout.layoutChildren(FrameLayout.java:639)
      42. android.widget.FrameLayout.onLayout(FrameLayout.java:574)
      43. android.view.View.layout(View.java:16001)
      44. android.view.ViewGroup.layout(ViewGroup.java:5181)
      45. android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2459)
      46. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2156)
      47. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1274)
      47 frames