skip to Main Content

I need to use RecyclerView with API 19 (API level 19).

I already have tried adding

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

and

implementation 'androidx.recyclerview:recyclerview:1.0.0'

in build.gradle but no success. I am new to Android development. I have checked 3-4 similar questions but no solution worked for me.
Please if someone can tell me all of the changes I need to make in build.gradle, XML and/or in manifest file?

Thank you!

2

Answers


  1. Chosen as BEST ANSWER

    I was able to run successfully after re-synching and re-building. If anyone faces this issue in future then add

    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    

    in build.gradle (Module) and then use

    <androidx.recyclerview.widget.RecyclerView
    

    in XML. You will have to sync because of the change in build.gradle.


  2. For these cases, apart from the things you mentioned, I also invalidate cache and restart. This helps me a lot sometimes.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search