天天看點

at android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:1764)

異常:

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()));
           

繼續閱讀