Android Studio - RecyclerView with API level 19 (API 19)

98
May 09, 2022, at 03:40 AM

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!

Answer 1

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

Answer 2

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.

Rent Charter Buses Company
READ ALSO
GMail composer links don&#39;t work on Android

GMail composer links don't work on Android

I am using GMail links like

107
junit.framework.AssertionFailedError: Expected&lt;BuildersKt$flowOf$$inlined$unsafeFlow&gt; but was:&lt;kotlinx.coroutines.flow.SafeFlow&gt;

junit.framework.AssertionFailedError: Expected<BuildersKt$flowOf$$inlined$unsafeFlow> but was:<kotlinx.coroutines.flow.SafeFlow>

I am trying to write android test cases for Room Dao, my return type is FlowI am getting the following error which I am not able to understand

154
Nested RecyclerView OnclickListener [closed]

Nested RecyclerView OnclickListener [closed]

Want to improve this question? Add details and clarify the problem by editing this post

110
Getting IMEI number using ADB commands Android 12

Getting IMEI number using ADB commands Android 12

For android versions before 11 I was using the below command to get IMEI number from my device:

197