gpt4 book ai didi

android - android(androidx) 中的 RecyclerView 依赖项?

转载 作者:行者123 更新时间:2023-11-29 16:28:09 24 4
gpt4 key购买 nike

我为 RecycleView 使用了实现 'com.google.android.material:material:1.0.0'。在布局中,当我输入“回收”时,它会给出 androidx.appcompat.app.AlertController$RecycleListView 的建议,这不是我想要的。

即使我正在输入这个 androidx.recyclerview.widget.RecyclerView 它也可以工作,但它不会让内部使用的属性,如 id、height、width 等。一个月前它工作正常,就像它给出了正确的建议,现在它完全没有显示 RecycleView。有人有解决方案吗?

最佳答案

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'

更新

这是我的 build.gradle 中一些库的列表:

implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

另见 Where is the RecyclerView in the support library?How to import RecyclerView for Android L-preview .

enter image description here

关于android - android(androidx) 中的 RecyclerView 依赖项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58798251/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com