我正在学习Android材质设计,但在两者之间它一直给出错误。谁可以帮我这个事?cardCornerRadius显示错误
workspace/RecyclerCardView/res/layout/list_item_row.xml:2: error: No resource identifier found for attribute 'cardCornerRadius' in package 'com.Zybo.recyclercardview'
<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:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
card_view:cardCornerRadius="5dp" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/img_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="7dp" />
<TextView
android:id="@+id/txt_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hellooo..." />
</LinearLayout>
</android.support.v7.widget.CardView>
确保你已经添加V7支持库 –
我已经创建了一个单独的库,其中包含卡视图和回收视图类,并添加了该项目作为支持库。我还在build.gradle文件中添加了依赖关系。 – Ramz