Skip to content Skip to sidebar Skip to footer

Error While Inflating Class Android.support.v7.widget.cardview

we already have a bunch of similar question to this but all of them was related to backward compatibility or they are on eclipse (as far i understand) but i think problem is occur

Solution 1:

Try this it will help you remove this android:foreground="?android:attr/selectableItemBackground"

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:paddingBottom="2dp">

<android.support.v7.widget.CardView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/cardview"
    card_view:cardBackgroundColor="@android:color/white"
    card_view:cardElevation="2dp"
    card_view:cardMaxElevation="2dp"
    card_view:cardUseCompatPadding="true">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">



....here i have a bunch of other layout elements
         </RelativeLayout>
    </android.support.v7.widget.CardView>



</LinearLayout>

Post a Comment for "Error While Inflating Class Android.support.v7.widget.cardview"