title: Using CardView and RecyclerView in my layout files throws an exception
body: <p>So I've been taking a shot at the Material Design of Android Preview L. I imported both the <code>CardView</code> and the <code>RecyclerView</code> libraries.</p>
  
  <p>I use the Android Studio preview version 0.8.0. Have the latest SDK packages installed.</p>
  
  <p>Once I use them in my layout files though, the previewer throws an exception for both of them.</p>
  
  <p>Here is the exception for the <code>CardView</code>:</p>
  
  <pre><code>java.lang.ClassFormatError: Illegal field name "CardView.Dark" in class android/support/v7/cardview/R$style
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:635)
  at org.jetbrains.android.uipreview.ProjectClassLoader.findClass(ProjectClassLoader.java:63)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  at android.support.v7.widget.CardView.initialize(CardView.java:69)
  at android.support.v7.widget.CardView.&lt;init&gt;(CardView.java:60)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
  at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:375)
  at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:100)
  at com.android.tools.idea.rendering.LayoutlibCallback.loadView(LayoutlibCallback.java:172)
  at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:207)
  at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:132)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:478)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:381)
  at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:395)
  at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:329)
  at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:332)
  at com.android.tools.idea.rendering.RenderService$3.compute(RenderService.java:575)
  at com.android.tools.idea.rendering.RenderService$3.compute(RenderService.java:564)
  at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
  at com.android.tools.idea.rendering.RenderService.createRenderSession(RenderService.java:564)
  at com.android.tools.idea.rendering.RenderService.render(RenderService.java:691)
  at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:586)
  at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1900(AndroidLayoutPreviewToolWindowManager.java:80)
  at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$6$1.run(AndroidLayoutPreviewToolWindowManager.java:528)
  at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
  at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
  at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
  at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
  at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$6.run(AndroidLayoutPreviewToolWindowManager.java:523)
  at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
  at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
  at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
  at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
  at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
  at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
  at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
  at com.intellij.util.Alarm$Request$1.run(Alarm.java:327)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:724)
  </code></pre>
  
  <p>And here is the exception for <code>RecyclerView</code>:</p>
  
  <pre><code>java.lang.NullPointerException
  at android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:1310)
  at android.view.View.measure(View.java:16987)
  at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:722)
  at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:458)
  at android.view.View.measure(View.java:16987)
  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5257)
  at android.widget.FrameLayout.onMeasure(FrameLayout.java:314)
  at android.view.View.measure(View.java:16987)
  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5257)
  at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:447)
  at android.view.View.measure(View.java:16987)
  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5257)
  at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
  at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1083)
  at android.widget.LinearLayout.onMeasure(LinearLayout.java:615)
  at android.view.View.measure(View.java:16987)
  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5257)
  at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
  at android.widget.LinearLayout.measureVertical(LinearLayout.java:722)
  at android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
  at android.view.View.measure(View.java:16987)
  at android.widget.LinearLayout.measureVertical(LinearLayout.java:875)
  at android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
  at android.view.View.measure(View.java:16987)
  at com.android.layoutlib.bridge.impl.RenderSessionImpl.measureView(RenderSessionImpl.java:621)
  at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:521)
  at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:331)
  at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:332)
  at com.android.tools.idea.rendering.RenderService$3.compute(RenderService.java:575)
  at com.android.tools.idea.rendering.RenderService$3.compute(RenderService.java:564)
  at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
  at com.android.tools.idea.rendering.RenderService.createRenderSession(RenderService.java:564)
  at com.android.tools.idea.rendering.RenderService.render(RenderService.java:691)
  at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:586)
  at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1900(AndroidLayoutPreviewToolWindowManager.java:80)
  at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$6$1.run(AndroidLayoutPreviewToolWindowManager.java:528)
  at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
  at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
  at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
  at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
  at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$6.run(AndroidLayoutPreviewToolWindowManager.java:523)
  at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
  at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
  at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
  at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
  at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
  at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
  at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
  at com.intellij.util.Alarm$Request$1.run(Alarm.java:327)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:724)
  </code></pre>
  
  <p>This makes building layout near impossible using these two (amazing) <code>View</code>s, which I'm most curious about.</p>
  
  <p>Is there a fix for this already, or is this actually expected behaviour seeing as they're "custom" <code>View</code>s, in a sense?</p>