java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference

Stack Overflow | bluemunch | 5 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    RecyclerAdapter not loading data unless I refresh

    Stack Overflow | 5 months ago | bluemunch
    java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
  2. 0

    NullPointerException in RecyclerAdapter

    Stack Overflow | 5 months ago | santafebound
    java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke interface method 'int java.util.List.size()' on a null object reference

      at com.yitter.feed.FeedAdapter.getItemCount()
    2. com.yitter.feed
      FeedAdapter.getItemCount
      1. com.yitter.feed.FeedAdapter.getItemCount(FeedAdapter.java:478)
      1 frame
    3. Android v7
      RecyclerView.onLayout
      1. android.support.v7.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:3170)
      2. android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3067)
      3. android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3518)
      3 frames
    4. Android Platform
      ViewGroup.layout
      1. android.view.View.layout(View.java:16636)
      2. android.view.ViewGroup.layout(ViewGroup.java:5437)
      2 frames
    5. Android Support v4
      SwipeRefreshLayout.onLayout
      1. android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:598)
      1 frame
    6. Android Platform
      ViewGroup.layout
      1. android.view.View.layout(View.java:16636)
      2. android.view.ViewGroup.layout(ViewGroup.java:5437)
      2 frames