“RecyclerView: No Adapter attached; skipping layout” for recyclerview in fragment [duplicate]
问题 This question already has answers here : recyclerview No adapter attached; skipping layout (30 answers) Closed 3 years ago . I'm getting this error but I don't know what is causing it...perhaps something to do with the fact that this is being initialized in a fragment and not in the activity itself. Edit: included StatsAdapter code public class StatsFragment extends Fragment { private RecyclerView mRecyclerView; private LinearLayoutManager mLinearLayoutManager; private RecyclerView.Adapter