title: Exception : android.view.InflateException: Binary XML file line #2: Error inflating class android.support.v7.widget.CardView
body: <p>I am using <code>CardView</code> of support library in my android app. I tried 4-5 hours to resolve this but i could not get success.</p>
  
  <p>I have added <code>CardView</code> as a library in my project &amp; v7 appcompat also</p>
  
  <pre><code>&lt;android.support.v7.widget.CardView
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_margin="5dp"
      android:orientation="horizontal"
      app:cardCornerRadius="4dp" &gt;
  </code></pre>
  
  <p>But my app is crashing with below logs</p>
  
  <pre><code>10-31 18:41:39.577: E/AndroidRuntime(5666): FATAL EXCEPTION: main
  10-31 18:41:39.577: E/AndroidRuntime(5666): Process: com.xyzladdoo, PID: 5666
  10-31 18:41:39.577: E/AndroidRuntime(5666): android.view.InflateException: Binary XML file line #2: Error inflating class android.support.v7.widget.CardView
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:707)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at com.xyzladdoo.adapters.RecycleViewAdapter.onCreateViewHolder(RecycleViewAdapter.java:85)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at com.xyzladdoo.adapters.RecycleViewAdapter.onCreateViewHolder(RecycleViewAdapter.java:1)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:2915)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:2511)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.support.v7.widget.LinearLayoutManager$RenderState.next(LinearLayoutManager.java:1425)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:999)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:524)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:1461)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:1600)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.View.layout(View.java:14860)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewGroup.layout(ViewGroup.java:4643)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:543)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.View.layout(View.java:14860)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewGroup.layout(ViewGroup.java:4643)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.View.layout(View.java:14860)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewGroup.layout(ViewGroup.java:4643)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.View.layout(View.java:14860)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewGroup.layout(ViewGroup.java:4643)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1594)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.View.layout(View.java:14860)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewGroup.layout(ViewGroup.java:4643)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:887)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.View.layout(View.java:14860)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewGroup.layout(ViewGroup.java:4643)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.View.layout(View.java:14860)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewGroup.layout(ViewGroup.java:4643)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.support.v7.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:502)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.View.layout(View.java:14860)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewGroup.layout(ViewGroup.java:4643)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.View.layout(View.java:14860)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewGroup.layout(ViewGroup.java:4643)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.View.layout(View.java:14860)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewGroup.layout(ViewGroup.java:4643)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.View.layout(View.java:14860)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewGroup.layout(ViewGroup.java:4643)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2013)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1770)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1019)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5725)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.Choreographer.doCallbacks(Choreographer.java:574)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at android.view.Choreographer.doFrame(Choreographer.java:544)
  10-31 18:41:39.577: E/AndroidRuntime(5666):     at an
  </code></pre>
  
  <p>Any help ? Thanks in advance.</p>