How to add cardview in layout xml in AndroidX
After upgraded to AndroidX
The class has changed to:
androidx.cardview.widget.CardView
If you want to use the old class names, you need to add android:enableJetifier=true to your gradle.properties and use the appcompat dependencies instead.
android:enableJetifier=true
gradle.properties