title: Rendering Problems: java.lang.NullPointerException at android.support.v7.widget.RecyclerView in Android Studio 1.1.0
body: <p>I have recently updated android sdk to api 22 and android studio 1.1.0. After that I am getting rendering issues on RecyclerView. Here is what I am getting</p>
  
  <pre><code>  java.lang.NullPointerException
  at android.support.v7.widget.RecyclerView.computeVerticalScrollRange(RecyclerView.java:1216)
  at android.view.View.onDrawScrollBars(View.java:12943)
  at android.view.View.draw(View.java:15237)
  at android.support.v7.widget.RecyclerView.draw(RecyclerView.java:2440)
  at android.view.View.draw(View.java:15140)
  at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3405)
  at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:53)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
  at android.view.View.draw(View.java:15138)
  at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3405)
  at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:53)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
  at android.view.View.draw(View.java:15234)
  at android.view.View.draw(View.java:15140)
  at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3405)
  at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:53)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
  at android.support.v4.widget.DrawerLayout.drawChild(DrawerLayout.java:1086)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
  at android.view.View.draw(View.java:15138)
  at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3405)
  at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:53)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
  at android.view.View.draw(View.java:15138)
  at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3405)
  at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:53)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
  at android.view.View.draw(View.java:15234)
  at android.view.View.draw(View.java:15140)
  at android.view.ViewGroup.drawChild_Original(ViewGroup.java:3405)
  at android.view.ViewGroup_Delegate.drawChild(ViewGroup_Delegate.java:53)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
  at android.view.View.draw(View.java:15234)
  </code></pre>
  
  <blockquote>
    <p>I am getting this exception on xml preview/design, so I am not able to
    view the xml design.</p>
  </blockquote>
  
  <p>The project is working fine without any exception.
  Here is my widget</p>
  
  <pre><code> &lt;android.support.v7.widget.RecyclerView
              android:id="@+id/my_recycler_view"
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_weight="8"
              android:layout_gravity="center"
              android:gravity="center"
              android:scrollbars="vertical"
              android:fadeScrollbars="false"
              /&gt;
  </code></pre>
  
  <p>This is my code</p>
  
  <pre><code>    recyclerView= (RecyclerView) findViewById(R.id.my_recycler_view);
      layoutManager=new GridLayoutManager(this,2);
      recyclerView.setLayoutManager(layoutManager);
      recyclerView.setHasFixedSize(true);
      recyclerView.setItemAnimator(new DefaultItemAnimator());
  </code></pre>
  
  <p>How to solve this issue?</p>