Home > Enterprise >  I am getting red line while using this dependency in android studio. How to resolve this?
I am getting red line while using this dependency in android studio. How to resolve this?

Time:06-23

implementation 'com.android.support:recyclerview-v7:28.0.0'

When I add this dependency, I got red line error

CodePudding user response:

You need to migrate to AndroidX. In your Android Studio project click Refactor -> Migrate to AndroidX (all implementations will be replaced from android.support to androidx).

CodePudding user response:

This component is by default available in Palette. Check it in Palette as below image

Solution -1

enter image description here

If you are not able to use it then you have to download it first. Sometimes developers have to download this before use. Just click on enter image description here download button to use.

Solution -2

use this dependency [For AndroidX]

implementation "androidx.recyclerview:recyclerview:1.2.1"
  • Related