E/recyclerview﹕ No Adapter Attached; Skipping Layout
Solution 1:
You need to attach your adapter when you initialize your RecyclerView
and attach LayoutManager, etc.
loadFriends
method should fetch data and add data to the adapter and then you should call notifyDataSetChanged
or equivalent.
What you're doing here is incorrect. A recyclerview should always have an adapter attached. You just need to update the data in the adapter.
And that's what the error says E/RecyclerView﹕ No adapter attached; skipping layout
. Because you have not attached adapter after attaching LayoutManager and you're attaching adapter at a later stage.
Solution 2:
Did you try adding LayoutManager in your recyclerView?
Make sure you call setLayoutManager
, like below.
recyclerView.setLayoutManager(newLinearLayoutManager(getContext()));
before setting adapter into recyclerView, otherwise it is not gonna work.
Source : - recyclerview-not-call-any-adapter-method
Post a Comment for "E/recyclerview﹕ No Adapter Attached; Skipping Layout"