Attempt to write to field 'int android.support.v7.widget.RecyclerView$ViewHolder.mItemViewType' on a null object reference
See original GitHub issue mBookingsList.enableLoadmore();
mBookingsList.setOnLoadMoreListener(new UltimateRecyclerView.OnLoadMoreListener() {
@Override
public void loadMore(int itemsCount, int maxLastVisiblePosition) {
}
});
I am getting null pointer exception when I scroll the recycler view.
Issue Analytics
- State:
- Created 8 years ago
- Comments:7
Top Results From Across the Web
Attempt to write to field 'int android.support.v7.widget ...
Your probably returning a null on onCreateViewHolder on your adapter class ... ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) ...
Read more >java.lang.NullPointerException: Attempt to write to field 'int ...
NullPointerException: Attempt to write to field 'int android.support.v7.widget.RecyclerView$ViewHolder.mItemViewType' on a null object #372.
Read more >Attempt to write to field 'int android.support.v7.widget ... - 简书
Attempt to write to field 'int android.support.v7.widget.RecyclerView$ViewHolder.mItemViewType' on a null object reference.
Read more >Attempt to write to field 'int android.support.v7.widget ... - 腾讯云
Attempt to write to field 'int android.support.v7.widget.RecyclerView$ViewHolder. ... mItemViewType' on a null object reference at ...
Read more >RecyclerView.ViewHolder - Android Developers
Returns the position of the ViewHolder in terms of the latest layout pass. final int. getOldPosition(). When LayoutManager supports animations, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Kaustubh-Deshmukh please check your
getViewHolder()
, if this method return null, would cause this issue.set mBookingsList.enableLoadmore() after add first items range