Trying to use the new RecyclerView from the support library. I downloaded the 20 update for the support library using the SDK manager.
I've added the jar file to the libs folder - and added to build path - no luck using the RecyclerView.
Tried to use also the gradle dependency according to Android Developer's API - not sure if this is the right place to look - this page is related more to AndroidTV :
com.android.support:recyclerview-v7:20.0.+
Cannot gradle sync the project.
Any ideas?
RecyclerView is the ViewGroup that contains the views corresponding to your data. It's a view itself, so you add RecyclerView into your layout the way you would add any other UI element. Each individual element in the list is defined by a view holder object.
Today, suddenly Recyclerview. Viewholder became deprecated. Other, android project is no deprecated.
Figured it out.
You'll have to add the following gradle dependency :
compile 'com.android.support:recyclerview-v7:+'
another issue I had compiling was the compileSdkVersion
. Apparently you'll have to compile it against android-L
Your build.gradle file should look something like this:
apply plugin: 'android' android { compileSdkVersion 'android-L' buildToolsVersion '19.1.0' [...] } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:recyclerview-v7:+' }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With