在Fragment下面使用LinearLayoutManager传入this和类名.this报错 解决方案: 传入this.getActivity(); RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.recycler_view); LinearLayoutManager layoutManager = new LinearLayoutManager(this.getActivity());