How to add cardview in layout xml in AndroidX
After upgraded to AndroidX
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp">
gives a error
The following classes could not be found:
-?android.support.v7.widget.CardView (Fix Build Path, Edit XML, Create Class)
dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
but I don't know how to use CardView in xml under AndroidX
Thank you
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…