无法将 android.support.v7.widget.CardView 导入 Eclipse
2022-09-04 01:57:29
我使用Eclipse,我正在尝试使用Lollipop的新应用程序创建一个应用程序。support-library-v7:21.+
- 创建了我的新项目
- 在日食中导入
support-library-v7
- 更改了支持库中的行:具有 21 个目标
project-properties
target=android-21
- 在 21 中更改了我的应用程序的目标
- 在我的项目中导入了库
- 全部清理干净
毕竟我仍然得到了无效的声明。我重新启动了Eclipse,然后在重新导入库后,似乎去了!我创建了一个和一个也没有问题 - 它的工作原理。R
Tolbar
NavigationDrawer
现在,我想在我的物品中放一个:CardView
ListView
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
>
<!-- A CardView that contains a TextView -->
<android.support.v7.widget.CardView
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view"
android:layout_gravity="center"
android:layout_width="200dp"
android:layout_height="200dp"
card_view:cardCornerRadius="4dp">
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/codename"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/versione"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/link"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/timestamp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</android.support.v7.widget.CardView>
</LinearLayout>
好吧,第一个错误:。我试图删除该属性,重新启动应用程序,但我得到以下崩溃:No resource identifier found for attribute 'cardCornerRadius'
java.lang.RuntimeException: Binary XML file line #2: You must supply a layout_width attribute.
我不明白问题出在哪里。