关闭

Error:(24, 13) Failed to resolve: com.android.support:recyclerview-v7:20.+ <a href="install.m2.repo"

标签: recyclerview-v720
15935人阅读 评论(0) 收藏 举报
分类:

Android studio   报错    Error:(24, 13) Failed to resolve: com.android.support:recyclerview-v7:20.+

<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

   Error:(25, 13) Failed to resolve: com.android.support:leanback-v17:20.+
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>


点击运行  报
Error:A problem occurred configuring project ':myapplication'.
> Could not resolve all dependencies for configuration ':myapplication:_debugCompile'.
   > Could not find any version that matches com.android.support:recyclerview-v7:20.+.
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/support/recyclerview-v7/maven-metadata.xml
         https://jcenter.bintray.com/com/android/support/recyclerview-v7/
         file:/D:/adt/adt-bundle-windows-x86_64-20140702/sdk/extras/android/m2repository/com/android/support/recyclerview-v7/maven-metadata.xml
         file:/D:/adt/adt-bundle-windows-x86_64-20140702/sdk/extras/google/m2repository/com/android/support/recyclerview-v7/maven-metadata.xml
         file:/D:/adt/adt-bundle-windows-x86_64-20140702/sdk/extras/google/m2repository/com/android/support/recyclerview-v7/
     Required by:
         MyApplication2:myapplication:unspecified
   > Could not find any version that matches com.android.support:leanback-v17:20.+.
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/support/leanback-v17/maven-metadata.xml
         https://jcenter.bintray.com/com/android/support/leanback-v17/
         file:/D:/adt/adt-bundle-windows-x86_64-20140702/sdk/extras/android/m2repository/com/android/support/leanback-v17/maven-metadata.xml
         file:/D:/adt/adt-bundle-windows-x86_64-20140702/sdk/extras/google/m2repository/com/android/support/leanback-v17/maven-metadata.xml
         file:/D:/adt/adt-bundle-windows-x86_64-20140702/sdk/extras/google/m2repository/com/android/support/leanback-v17/
     Required by:
         MyApplication2:myapplication:unspecified


解决方案:
  1. 根据路径  找到 file:/D:/adt/adt-bundle-windows-x86_64-20140702/sdk/extras/android/m2repository/com/android/support/leanback-v17/maven-metadata.xml

  2.打开maven-metadata。xml    
metadata>
  <groupId>com.android.support</groupId>
  <artifactId>recyclerview-v7</artifactId>
  <version>21.0.0</version>
-<versioning>
-<versions>
  <version>21.0.0</version>
  <version>21.0.2</version>
  <version>21.0.3</version>
  <version>22.0.0</version>
  <version>22.1.0</version>
  <version>22.2.0</version>
  </versions>
  <lastUpdated>20150521233210</lastUpdated>
  </versioning>
  </metadata>

3.  可以看到版本号是21+,所以更改  

com.android.support:recyclerview-v7:20.+为

com.android.support:recyclerview-v7:21.+

同理根据上面方法打开
file:/D:/adt/adt-bundle-windows-x86_64-20140702/sdk/extras/android/m2repository/com/android/support/leanback-v17/maven-metadata.xml

<?xml version="1.0" encoding="UTF-8"?>
-<metadata>
  <groupId>com.android.support</groupId>
  <artifactId>leanback-v17</artifactId>
  <version>21.0.0</version>
-<versioning>
-<versions>
  <version>21.0.0</version>
  <version>21.0.2</version>
  <version>21.0.3</version>
  <version>22.0.0</version>
  <version>22.1.0</version>
  <version>22.2.0</version>
  </versions>
  <lastUpdated>20150521233206</lastUpdated>
  </versioning>
  </metadata>
com.android.support:leanback-v17:20.+改为com.android.support:leanback-v17:21.+
1
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:81217次
    • 积分:1267
    • 等级:
    • 排名:千里之外
    • 原创:52篇
    • 转载:0篇
    • 译文:0篇
    • 评论:15条
    最新评论