[英]RecyclerView doesn't show up in Android Studio Preview
这就是我在布局中添加 recyclerView 时得到的结果。(我已经导入了依赖项)
我的布局:
<?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>
这是我设置高度和宽度来包装内容的时候:
在这里,我看不到像这样的常规回收站视图:
那么,如何在 Android Studio 上恢复此视图?
迄今为止尝试的解决方案;
1.使缓存无效
2.删除Android Studio 4.0目录下的Caches文件夹
Build > Clean Project解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.