amir R-ian
amir R-ian

Reputation: 61

material support library, can't find Cardview/Recycleview

I have searched the internet but i couldn't find my answer. How can I use Card view/Recycle view they are not in my layout palette or i can't use them manually and I am using eclipse

Upvotes: 3

Views: 4204

Answers (3)

Tim Glenn
Tim Glenn

Reputation: 244

In the layout palette there is a section called "Custom" click on the "CustomView" and you shall see all the imported views from the dependencies added in the gradle file. enter image description here

Upvotes: 1

amir R-ian
amir R-ian

Reputation: 61

my problem when adding the library was the same as this guys problem

Unable to add library to android project

so I fixed it.

Upvotes: 0

Rolf ツ
Rolf ツ

Reputation: 8781

The CardView and RecycleView are not by default in the AppCompat library. You should include the CardView and RecycleView libraries manual to your project.

Reference: https://developer.android.com/training/material/lists-cards.html#Dependencies

Gradle (using Android Studio):

dependencies {
    compile 'com.android.support:appcompat-v7:21.0.+'
    compile 'com.android.support:cardview-v7:21.0.+'
    compile 'com.android.support:recyclerview-v7:21.0.+'
}

Upvotes: 9

Related Questions