为 com.android.support.recyclerview-v7 安装存储库 Android Studio 错误

installing repository for com.android.support.recyclerview-v7 for Android Studio error

我是 android studio 的初学者,我尝试使用 recyclerView。当我尝试将 compile 'com.android.support.recyclerview-v7:21.0.+' 添加到我的 gradle 文件时,出现错误:

 failed to resolve com.android.support.receyclerview-v7v7:21.0.+.

It proposes me to install repository and sync project. when I click it, i get this error:
SDK Path C:\User\userName\AppData\Local\Android\sdk1
loading SDK information
ignoring unknown package filter 'extra-android-m2repository' warning: The package filter removed all packages. There is nothing to install. Please consider trying to update again without a package filter.
install failed, please check your network connection and try again. You may continue with creating your project, but it will not compile correctly without the missing components.  

我提到我在 windows 系统上使用 sdk 23.0.0,当我第一次安装 android studio 时,我收到了一条关于代理的错误消息(不幸的是我跳过)!

有解决这个问题的想法吗??!!!

首先,运行 SDK 管理器并检查您的支持库存储库是否已更新。

然后打开您的build.gradle(不是顶层文件)并添加:

dependencies{

    //....
    compile 'com.android.support:recyclerview-v7:23.0.0'
}

注意。你在你的问题中报告了你的图书馆中的错字(编译'com.android.support.recyclerview-v7:21.0.+')

使用 v23 必须使用 API23 进行编译。

当然你可以使用 "old" 版本:

 compile 'com.android.support:recyclerview-v7:22.2.1'
 compile 'com.android.support:recyclerview-v7:21.1.3'