0
Я пытаюсь реализовать дизайн CardView в своем коде; однако, я получаю сообщение об ошибке, которое указывает, что TextView и RelativeLayout здесь не разрешены.Ошибка Android CardView
<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"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical">
<android.support.v7.widget.CardView
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
style="@style/ItemBackground">
<TextView android:text="@string/weather"
android:id="@+id/weather_header"
style="@style/ItemHeader" />
<TextView
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/weather_header"
android:textSize="32sp"
android:textColor="#000000" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
Вы положили '' com.android.support:cardview-v7: + ''в свой град? –
да, у меня есть компиляция 'com.android.support:appcompat-v7:22.2.0' compile 'com.android.support:cardview-v7:+' –
попробуйте удалить стиль из относительного и текстового просмотра и посмотреть, работает. –