Android添加RecyclerView依赖库

在app/build.gradle文件中dependencies里面添加

def recyclerview_version ="1.1.0"
implementation "androidx.recyclerview:recyclerview:$recyclerview_version"
// For control over item selection of both touch and mouse driven selection
implementation "androidx.recyclerview:recyclerview-selection:1.1.0-alpha05"

然后同步
在xml里写<androidx.recyclerview.widget.RecyclerView />即可

上一篇:Android实现悬浮按钮弹出不同方向子按钮


下一篇:No implementation found for int com.baidu.mapsdkplatform.comjni.tools.JNITools.initClass