RecyclerView缺失 [英] RecyclerView is missing
问题描述
我刚安装了新的SDK工具(Android的大号开发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管理器安装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:+'
已更新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 23
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屋!