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
If you using the updated or 2018 Version for Android Studio...
compile 'com.android.support:recyclerview-v7:+'
will give you an error with following message "Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018."
Try using this
implementation 'com.android.support:recyclerview-v7:+'
The steps before me are just missing one step.
After altering the build.gradle (Module:app) and adding the following dependencies:
compile 'com.android.support:cardview-v7:21.0.+'
compile 'com.android.support:recyclerview-v7:21.0.+'
(Add cardview if necessary)
You must then must go to Build > Clean Project to get rid of any errors
in my case I fixed it by putting compile 'com.android.support:recyclerview-v7:22.0.0'
as a dependency into my gradle build
(with Android studio v. 1.2.1.1 and all sdk's updated.)
It's really annoying when codes are updated so fast and the IDE can't keep track of them, and you have to manually fix for them, wasting time and resources.
But well, at last it works.
include the dependency in the build.gradle
, and sync the project with gradle
files
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:25.1.0'
//include the revision no, i.e 25.1.1
implementation 'com.android.support:recyclerview-v7:25.1.1'
}
Include the revision(here its 25.1.1) to avoid unpredictable builds, check library revisions