異常:
異常:
java.lang.NullPoinat android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:1764)
方案:
方案:
I got this error when my RecyclerView had no LayoutManager. Adding this code fixed the problem:
recyclerView.setLayoutManager(new LinearLayoutManager(recyclerView.getContext()));