java.lang.IllegalStateException: RecyclerView has no LayoutManager

 java.lang.IllegalStateException: RecyclerView has no LayoutManager android.support.v7.widget.RecyclerView{332dc79c VFED.... ......I. 0,0-0,0}, adapter:null, layout:null, context:com.iih.mbh.mp.commonmp.view.CommonMpActivity@2a86bcb9
        at android.support.v7.widget.RecyclerView.generateLayoutParams(RecyclerView.java:4072)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:808)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:414)

原因: 误在布局中  给RecycleView加了个子布局


           

            

        

把子布局删除就可以了(ps:当时是想把View放到RecycleView下面的,结果大意了)

你可能感兴趣的:(android,RecyclerView)