Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

For Android Material support libraries, where can I find CardView and RecyclerView?

I cannot find RecyclerView, Palette or CardView in the support libraries. Emulators responds with a "Class Not Found" error.

How can I fix an error like this?

like image 650
zubietaroberto Avatar asked Jun 27 '14 12:06

zubietaroberto


People also ask

What is RecyclerView and CardView in Android?

CardView: CardView is an extended version of Framelayout which can be used to show items inside the card format. With the help of CardView, we can add radius, elevation to our items of RecyclerView. CardView gives a rich look and feels to our list of data. RecyclerView: RecyclerView is an extended version of ListView.

How do I add a CardView library?

To add a dependency on CardView, you must add the Google Maven repository to your project. Read Google's Maven repository for more information. For more information about dependencies, see Add build dependencies.

How do I add a library Android support v7 Appcompat in Android Studio?

In the Properties window, select the "Android" properties group at left and locate the Library properties at right. Select /path/to/appcompat/ and Click Remove. Click Add to open the Project Selection dialog. From the list of available library projects, select v7 appcompat library and click OK.

What are support libraries in Android?

The Android Support Library package is a set of code libraries that provide backward-compatible versions of Android framework APIs as well as features that are only available through the library APIs. Each Support Library is backward-compatible to a specific Android API level.


1 Answers

You require these libraries in your build.gradle.

compile 'com.android.support:cardview-v7:+' compile 'com.android.support:recyclerview-v7:+' compile 'com.android.support:palette-v7:+' 

Source: http://www.reddit.com/r/androiddev/comments/297xli/howto_use_the_v21_support_libs_on_older_versions/

like image 132
zubietaroberto Avatar answered Oct 02 '22 16:10

zubietaroberto