android - RecyclerView 未显示在 Android Studio 预览版中
问题描述
这就是我在布局中添加 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解决了这个问题。
推荐阅读
- python - PyCharm Nosetests 运行而不是运行
- macos - 本地端口转发到 MacOS 上的 wlan ip 地址
- angular - 使用 Angular http.get 获取非常大的 json 文件
- angular - 当数组用排序重新排序时,如何用角度/动画为 ngFor 列表中的数组的单个元素设置动画?
- database - Android SQlite 数据库表没有列错误
- php - 在 Codeigniter 4 的 CLI 命令上捕获 mysqli_sql_exception
- python-3.x - 试图在 DataFrame 分配数据帧中的切片副本上设置一个值
- python - 为什么十六进制字节数据 b'\x35' 在 Python 中被解释为 b'5'?
- flutter - 如果您的项目有 dart html 导入,如何在模拟器上运行颤振
- wordpress - 无法在多站点 Wordpress 上安装任何插件