Recyclerview Dependencies In Android(androidx)?
I used implementation 'com.google.android.material:material:1.0.0' for RecycleView. In layout when I'm typing 'recycle' it gives suggestion as androidx.appcompat.app.AlertControlle
Solution 1:
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
Update
Here is a list of some libraries in my build.gradle
:
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
Also see Where is the RecyclerView in the support library? and How to import RecyclerView for Android L-preview.
Solution 2:
First of all remove your all dependency related to
RecyclerView
, then go to your XML and then switch to design. You will seeRecyclerView
with download arrow. Click on that arrow.This will add a dependency according to your SDK version. No need to add particular version for that.This will do by itself.
Post a Comment for "Recyclerview Dependencies In Android(androidx)?"