title: Binary XML file line #3: Error inflating class android.support.v7.widget.CardView in android
body: <p>below is my xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!-- item_feed.xml --&gt;
  &lt;android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:card_view="http://schemas.android.com/apk/res-auto"
      android:id="@+id/card_view"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_gravity="center"
      android:layout_margin="8dp"
      &gt;
  &lt;/android.support.v7.widget.CardView&gt;
  </code></pre>
  
  <p>logcat:</p>
  
  <pre><code>02-02 15:28:19.537: E/AndroidRuntime(1738): FATAL EXCEPTION: main
  02-02 15:28:19.537: E/AndroidRuntime(1738): android.view.InflateException: Binary XML file line #3: Error inflating class android.support.v7.widget.CardView
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.LayoutInflater.createView(LayoutInflater.java:613)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at io.github.froger.instamaterial.FeedAdapter.onCreateViewHolder(FeedAdapter.java:52)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:4121)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:3431)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:3340)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1810)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1306)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1269)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:523)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:1988)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:2237)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.View.layout(View.java:13754)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.ViewGroup.layout(ViewGroup.java:4362)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.widget.RelativeLayout.onLayout(RelativeLayout.java:948)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.View.layout(View.java:13754)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.ViewGroup.layout(ViewGroup.java:4362)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.View.layout(View.java:13754)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.ViewGroup.layout(ViewGroup.java:4362)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:890)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.View.layout(View.java:13754)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.ViewGroup.layout(ViewGroup.java:4362)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.View.layout(View.java:13754)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.ViewGroup.layout(ViewGroup.java:4362)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.View.layout(View.java:13754)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.ViewGroup.layout(ViewGroup.java:4362)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.View.layout(View.java:13754)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.ViewGroup.layout(ViewGroup.java:4362)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.View.layout(View.java:13754)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.ViewGroup.layout(ViewGroup.java:4362)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.View.layout(View.java:13754)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.ViewGroup.layout(ViewGroup.java:4362)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1866)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1687)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:998)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4212)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.Choreographer.doCallbacks(Choreographer.java:555)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.Choreographer.doFrame(Choreographer.java:525)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.os.Handler.handleCallback(Handler.java:615)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.os.Handler.dispatchMessage(Handler.java:92)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.os.Looper.loop(Looper.java:137)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at android.app.ActivityThread.main(ActivityThread.java:4745)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at java.lang.reflect.Method.invokeNative(Native Method)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at java.lang.reflect.Method.invoke(Method.java:511)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
  02-02 15:28:19.537: E/AndroidRuntime(1738):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.j
  </code></pre>
  
  <p>i also added CardView library in project using both jar and as a library project but still face this problem.</p>
  
  <p>and i already tried below links:</p>
  
  <p><a href="https://stackoverflow.com/questions/26494346/error-inflating-class-and-android-support-v7-widget-cardview?rq=1">Error inflating class and android.support.v7.widget.CardView</a></p>
  
  <p><a href="https://stackoverflow.com/questions/26675682/exception-android-view-inflateexception-binary-xml-file-line-2-error-inflat?lq=1">Exception : android.view.InflateException: Binary XML file line #2: Error inflating class android.support.v7.widget.CardView</a></p>