How to add cardview in layout xml in 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.

Leave a Comment