android - Error: Error parsing XML: unbound prefix in XML -


i trying use cardview in project, while creating xml file cardview, keep getting error

error: error parsing xml: unbound prefix

but if take out cardview widget, works. looked @ other questions , tried responses isn't working. see wrong code?

 <?xml version="1.0" encoding="utf-8"?>  <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"      xmlns:tools="http://schemas.android.com/tools"      android:layout_width="match_parent"      android:layout_height="match_parent"      android:orientation="horizontal" >       <android.support.v7.widget.cardview          android:layout_width="match_parent"          android:layout_height="wrap_content"          android:layout_margin="8dp"          card_view:cardcornerradius="2dp" >      </android.support.v7.widget.cardview>   </linearlayout> 

 <?xml version="1.0" encoding="utf-8"?>  <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"  xmlns:card_view="http://schemas.android.com/apk/res-auto"  xmlns:tools="http://schemas.android.com/tools"  android:layout_width="match_parent"  android:layout_height="match_parent"  android:orientation="horizontal" >   <android.support.v7.widget.cardview      android:layout_width="match_parent"      android:layout_height="wrap_content"      android:layout_margin="8dp"      card_view:cardcornerradius="2dp" >  </android.support.v7.widget.cardview> 

you should add xmlns:card_view="http://schemas.android.com/apk/res-auto" parent layout


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -