-1

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>

RecyclerView in layout

This is when I set height and width to wrap content:

enter image description here

Here I can't see the regular Recycler View like this:

enter image description here

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

null_override
  • 467
  • 3
  • 10
  • 30

1 Answers1

1

Build > Clean Project solved the issue.

null_override
  • 467
  • 3
  • 10
  • 30
  • 1
    I recommend trying that next time before resorting to Stack Overflow, it helps with a wide variety of issues. – Eugen Pechanec Aug 16 '20 at 14:53
  • Thanks for your suggestion ! At first I tried the good old ,Invalidate Caches option and it didn't work (3 times) Then I deleted the cache and it didn't work also.Then,I tried to search on Google and SO ..but didn't find anything. Ultimately, clean project did the magic. – null_override Aug 16 '20 at 16:40
  • There's also this project https://github.com/rock3r/deep-clean, sounds fun, but never tried it. – Eugen Pechanec Aug 16 '20 at 18:12
  • It's seems like a game on Linux terminal. LOL ... It may come handy for someone out there, but not for me, I guess! – null_override Aug 16 '20 at 18:19