Tags
Android
Asked 3 years ago
4 Oct 2021
Views 711
Jaunita

Jaunita posted

Android - missing RecyclerView in Androidx

Cannot resolve class android.support.v7.widget.RecyclerView

  <android.support.v7.widget.RecyclerView
                        android:id="@+id/re"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:scrollbars="none" />
yogi

yogi
answered Oct 4 '21 00:00

use <androidx.recyclerview.widget.RecyclerView> instead of <android.support.v7.widget.RecyclerView>

so code in androidx become like this:

  <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/re"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:scrollbars="none" />


Post Answer