Android获取CardView必须由匹配的结束标记错误终止

时间:2016-12-29 10:34:40

标签: android android-cardview

当我尝试使用CardView时,我会收到以下错误:

Error:Execution failed for task ':app:dataBindingProcessLayoutsDebug'.
> org.xml.sax.SAXParseException; systemId: file:/Volumes/Home/Projects/Android/cafeAlachiq/app/build/res/layout/channels_item_fields.xml; lineNumber: 92; columnNumber: 7; The element type "android.support.v7.widget.CardView" must be terminated by the matching end-tag "</android.support.v7.widget.CardView>".

我搜索并检查CardView打开和关闭标签,但我没有发现问题和android studio渲染正确布局

这是我的布局结构,请帮我解决这个问题。清除无法解决此问题的项目和重建

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/category_lists_root"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="#ffffff"
    android:orientation="vertical">

    <android.support.v7.widget.CardView
        android:id="@+id/cv"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="60dp"
            android:layout_marginBottom="5dp"
            android:layout_marginLeft="4dp"
            android:layout_marginRight="4dp"
            android:layout_marginTop="5dp"
            android:background="@android:color/white"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <com.pishguy.androidapplication.cafemaku.Libraries.CircularImageView
                android:id="@+id/category_avatar"
                android:layout_width="55dp"
                android:layout_height="55dp"
                android:layout_marginLeft="5dp"
                android:layout_marginRight="5dp"
                app:civ_border_color="#000"
                app:civ_border_width="4dp"
                app:civ_shadow="false"/>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center_vertical"
                android:orientation="horizontal">

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

                    <TextView
                        android:id="@+id/category_name"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"/>

                    <TextView
                        android:id="@+id/category_description"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"/>
                </RelativeLayout>

                <TextView
                    android:id="@+id/count_channels"
                    android:layout_width="0dp"
                    android:layout_height="30dp"/>
            </LinearLayout>

        </LinearLayout>
    </android.support.v7.widget.CardView>
</LinearLayout>

0 个答案:

没有答案