在线咨询
微信咨询
服务热线
服务热线:15639912513
TOP
当前位置:
首页 > 新闻中心> 安卓课堂>Namespace 'app' is not bound

Namespace 'app' is not bound

发布时间:2020-03-07 浏览:4962次

郑州app开发RecyclerView实例过程中,遇到使用CardView控件的时候,提示Namespace 'app' is not bound。

查了下,原来是少了一个声明。

xmlns:app="http://schemas.android.com/apk/res-auto"

整套代码如下

{androidx.cardview.widget.CardView xmlns:app="http://schemas.android.com/apk/res-auto"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:background="#fff"

        app:cardUseCompatPadding="true"

 }


TAG
4962
该内容对我有帮助