由于支持库,无法迭代编译依赖关系 [英] Can't iterate over compile dependecies due to support library

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

问题描述

我试图支持eclipse IDE使用我的aar基于此链接

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

尝试迭代编译依赖关系时遇到问题

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天全站免登陆