How Can I Add Cardview To My Android Studio Project?
I've been having this problem for a long time. ERROR: Failed to resolve: cardview Affected Modules: app apply plugin: 'com.android.application' apply plugin: 'com.google.gms.go
Solution 1:
Add implementation 'com.google.android.material:material:1.1.0'
to your dependencies
Solution 2:
Navigate to the layout design part and select design oy now in the search (left side of page) search for card view. If that isn't downloaded you'll find a download symbol right next to it. Click on it and this will add the following dependency
com.google.android.material:material:1.0.0
and you're done.
Solution 3:
You can add implementation "androidx.cardview:cardview:1.0.0" this dependency in your build.gradle (Module:app)
In your layout file:
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools">
</androidx.cardview.widget.CardView>
Post a Comment for "How Can I Add Cardview To My Android Studio Project?"