问题
This is what I am getting when I add a recyclerView in my layout.(I already imported the dependency)
My Layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
This is when I set height and width to wrap content:
Here I can't see the regular Recycler View like this:
So, how to get this view back on Android Studio?
Solutions tried so far;
1.Invalidate Caches
2.Delete the Caches folder in Android Studio 4.0 directory
回答1:
Build > Clean Project solved the issue.
来源:https://stackoverflow.com/questions/63437319/recyclerview-doesnt-show-up-in-android-studio-preview