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 th
Other answers did not work for me. I had to add this line:
compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'com.android.support:recyclerview-v7:24.2.1'
This works for me. Try it.
My dependencies;
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.1.0'
//RecyclerView dependency
compile 'com.android.support:recyclerview-v7:25.1.0'
// Instrumentation dependencies use androidTestCompile
// (as opposed to testCompile for local unit tests run in the JVM)
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support:support-annotations:25.1.0'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
}
I added only compile 'com.android.support:recyclerview-v7:25.1.0'. The important thing is to add RecycleView dependency which is as the same version as appcompat
I have created using following lines and this works for me.
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
For AndroidX
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
For complete tutorial please see here
RecyclerView can now be added by compiling design dependency in app gradle:
dependencies {
...
compile 'com.android.support:design:24.0.0'
}
I used this one is working for me. One thing needs to be consider that what appcompat
version you are using. I am using appcompat-v7:26.+
so this is working for me.
implementation 'com.android.support:recyclerview-v7:26.+'