如何使用支持版本的回收站视图而不是 Androidx

How to use support version of recycler view instead of Androidx

我使用的是 androidx 回收器视图。但现在我想使用回收站视图的支持版本。我已经删除了 androidx 依赖项并在 gradle 中添加了支持依赖项。同步效果很好。但是现在 ide 没有显示 android.support.widget.recyclerview。它仍然显示 androidx.recylerview.widget.recyclerview。我该怎么办?

如果您正在使用 androidx 库,您只能使用 androidx 库,即 android 不支持 android x 和支持库同时,因此您需要更改所有 android x 库以支持库

参考这个 link https://developer.android.com/jetpack/androidx/migrate/artifact-mappings

尝试迁移到 AppCompat...

重构 > 迁移到 AppCompat...

但如Peter Alwin所说,"android does not support both androidX and support library at the same time"。