RecyclerView缺少 [英] RecyclerView is missing
问题描述
我刚刚安装了新的SDK工具(Android L Developer Preview),我试图使用 RecyclerView
,但似乎缺少。
I just installed the new SDK tools (Android L Developer Preview), and I'm trying to use RecyclerView
but it seems to be missing.
从我的理解我应该包括 v7
支持库,但我似乎不能这样做...
From my understanding I should include the v7
support library, but I can't seem to do that...
我似乎找不到SDK文件夹中的v7库(我从SDK Manager安装了Android支持库)。
I can't seem to find the v7 library in the SDK folder (I did install the Android Support Library from the SDK Manager).
谢谢你。
推荐答案
你必须更新android存储库,支持库,你必须使用依赖关系:
You have to update the android repository, the support library and you have to use this dependency:
compile 'com.android.support:recyclerview-v7:+'
您可以参考stackoverflow文档更多细节。
You can refer the stackoverflow documentation for more details.
UPDATED 16/10/2015: / strong>
UPDATED 16/10/2015:
使用 +
不是一个好的选择,因为您将来无法复制该构建。
Using the +
is not a good option because you are not able to replicate the build in the future.
您可以使用这些版本之一。检查你的sdk的更新版本:
You can use one of these versions. Check your sdk for updated version:
//it requires compileSdkVersion 25
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
//it requires compileSdkVersion 24
compile 'com.android.support:recyclerview-v7:24.1.1'
compile 'com.android.support:recyclerview-v7:24.1.0'
//it requires compileSdkVersion 23
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:recyclerview-v7:23.2.1'
compile 'com.android.support:recyclerview-v7:23.2.0'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.0'
//it requires compileSdkVersion 22
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.android.support:recyclerview-v7:22.1.1'
compile 'com.android.support:recyclerview-v7:22.1.0'
compile 'com.android.support:recyclerview-v7:22.0.0'
//it requires compileSdkVersion 21
compile 'com.android.support:recyclerview-v7:21.0.3'
compile 'com.android.support:recyclerview-v7:21.0.2'
compile 'com.android.support:recyclerview-v7:21.0.0'
您可以找到更多这里的信息。
这篇关于RecyclerView缺少的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!