如图所示,我在libs中引入了recyclerview-v7-23.1.1-sources的jar包,但是在编辑器中输入Recycler却没有提示,显然是导入失败了
这是jar的结构,可以看到明显是有一个RecyclerView的,不知道为什么没办法导入
gradle中用了两种方式引入也没能解决
我知道可以直接从中央仓库下载,而且本地仓库里也有RecyclerView。但我要的是在无网络的情况下使用jar来导入。
项目要是已经迁移到androidX , 建议使用dependences 依赖
implementation "androidx.recyclerview:recyclerview:1.2.0"
如果是androidx项目的话用androidx的包,
// recyclerview
implementation 'androidx.recyclerview:recyclerview:1.2.1'
这个是列表适配器挺好用的案例给你
// 万能适配器
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.7'
按理说不应该。你有同步gradle吗?全路径打出来能访问吗?
有没有可能是Androidstudio的问题,IDE没有联想提示,但是可以运行