Home > Blockchain >  Android Studio - RecyclerView with API level 19 (API 19)
Android Studio - RecyclerView with API level 19 (API 19)

Time:02-08

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!

CodePudding user response:

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

implementation 'androidx.recyclerview:recyclerview:1.0.0'

in build.gradle (Module) and then used

<androidx.recyclerview.widget.RecyclerView

in XML. I had to synch because of the change in build.gradle.

CodePudding user response:

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

  •  Tags:  
  • Related