郑州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"
}