无法遍历编译由于支持库依赖条件 [英] Can't iterate over compile dependecies due to support library

查看:178
本文介绍了无法遍历编译由于支持库依赖条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想支持Eclipse IDE中使用基于<一个我AAR href=\"http://stackoverflow.com/questions/16709305/add-dependencies-via-gradle-to-eclipse-in-android-project\">此链接

I'm trying to Support eclipse IDE to use my aar based on this link

我试图遍历编译dependncies时遇到问题

I encountered a problem when trying to iterate over compile dependncies

configurations.compile.filter {it.name.endsWith 'jar'}.each { File file -> moveJarIntoLibs(file)}

Error:Could not find com.android.support:support-v13:22.1.1.
Searched in the following locations:
file:/C:/Users/myUser/.m2/repository/com/android/support/support-v13/22.1.1/support-v13-22.1.1.pom
file:/C:/Users/myUser/.m2/repository/com/android/support/support-v13/22.1.1/support-v13-22.1.1.jar

Required by:
com.company.project.sdk.android:project:3.0.0-SNAPSHOT

如果我评论该行构建成功。

If I remark this line the build is successful.

另外,我已经安装了支持库。

Also, I have the support library installed.

任何想法如何支持Eclipse的IDE /解决这个问题呢?

Any ideas how to support Eclipse IDE / Resolve this problem?

推荐答案

看来,问题涉及的事实,支持信息库不为存储库自动包括在内。我发现的有关问题在 Android项目问题69270 跟着加入本地支持库作为Maven仓库

It seems that the problem was related to the fact that support repository is not included automatically as a repository. I found the related issue in Android project issue 69270 and followed the suggestion of adding the local support repository as maven repository

repositories {
  def androidHome = System.getenv("ANDROID_HOME")
  mavenCentral()
  maven {
      url "$androidHome/extras/android/m2repository/"
  }
}

现在的问题不再发生。

这篇关于无法遍历编译由于支持库依赖条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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