安装了com.android.support.recyclerview-V7库为Android Studio错误 [英] installing repository for com.android.support.recyclerview-v7 for Android Studio error

查看:3037
本文介绍了安装了com.android.support.recyclerview-V7库为Android Studio错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在机器人工作室初学者,我尝试使用recyclerView。当我尝试添加编译com.android.support.recyclerview-V7:21.0 +来的gradle我的文件,我得到的错误:

I'm a beginner in android studio and I try to use a recyclerView. When I try to add compile 'com.android.support.recyclerview-v7:21.0.+' to my gradle file, I get the error:

 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.  

我提到我使用SDK 23.0.0在Windows系统上,并第一次安装Android的工作室时,我得到一个错误消息,担心代理(即我不幸跳过)!

I mention that I'm using sdk 23.0.0 on a windows system, and when installing android studio for the first time I got an error message that concern proxy (that i unfortunately skipped)!!

任何想法来解决这个问题?? !!!

Any idea to solve this problem ??!!!

推荐答案

首先,运行SDK管理器并检查您的支持库库进行更新。

First of all, run the SDK Manager and check if your support libraries repository is updated.

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

Then open your build.gradle (not the top level file) and add:

dependencies{

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

留意。你在你的问题在​​您的图书馆报告错字(编译'com.android.support.recyclerview-V7:21.0 +')

Pay attention. You report in your question a typo in your library (compile 'com.android.support.recyclerview-v7:21.0.+')

使用你有API23编译V23。

Using the v23 you have to compile with API23.

当然,你可以使用使用旧版本:

Of course you can use a "old" version using:

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

这篇关于安装了com.android.support.recyclerview-V7库为Android Studio错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆