android – Gradle自定义存储库和依赖项解析

android – Gradle自定义存储库和依赖项解析,第1张

概述我正在开发的项目需要 scribe-java和 crashlytics库.这两个库都可以从自定义存储库中获得. build.gradle看起来像: buildscript { repositories { maven { url 'http://download.crashlytics.com/maven' } } dependencies { 我正在开发的项目需要 scribe-java和 crashlytics库.这两个库都可以从自定义存储库中获得. @H_404_2@build.gradle看起来像:

buildscript {    repositorIEs {        maven { url 'http://download.crashlytics.com/maven' }    }    dependencIEs {        classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'    }}apply plugin: 'androID'apply plugin: 'crashlytics'repositorIEs {    // is required by Crashlytics library    maven { url 'http://download.crashlytics.com/maven' }    // is required by Scribe library    maven { url 'https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/' }}....dependencIEs {    compile 'com.androID.support:support-v4:+'    compile 'com.crashlytics.androID:crashlytics:1.+'    ...    // OAuth/OAuth2    compile 'org.scribe:scribe:1.3.6'    ...}
@H_404_2@使用这样的设置存储库解决方案在构建过程中变得混乱,以至于gradle尝试从不适当的存储库中解析工件:

Resource missing. [http GET: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/crashlytics/androID/crashlytics/maven-Metadata.xml]Failed to get resource: GET. [http http/1.1 400 Bad Request: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/crashlytics/androID/crashlytics/]Resource missing. [http GET: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/nineoldandroIDs/library/maven-Metadata.xml]Failed to get resource: GET. [http http/1.1 400 Bad Request: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/nineoldandroIDs/library/]Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0Resource missing. [http GET: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/androID/support/appcompat-v7/maven-Metadata.xml]Failed to get resource: GET. [http http/1.1 400 Bad Request: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/androID/support/appcompat-v7/]Resource missing. [http GET: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/crashlytics/androID/crashlytics/maven-Metadata.xml]Failed to get resource: GET. [http http/1.1 400 Bad Request: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/crashlytics/androID/crashlytics/]Resource missing. [http GET: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/nineoldandroIDs/library/maven-Metadata.xml]Failed to get resource: GET. [http http/1.1 400 Bad Request: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/nineoldandroIDs/library/]Resource missing. [http GET: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/androID/support/appcompat-v7/maven-Metadata.xml]Failed to get resource: GET. [http http/1.1 400 Bad Request: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/androID/support/appcompat-v7/]Resource missing. [http GET: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/crashlytics/androID/crashlytics/maven-Metadata.xml]Failed to get resource: GET. [http http/1.1 400 Bad Request: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/crashlytics/androID/crashlytics/]Resource missing. [http GET: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/nineoldandroIDs/library/maven-Metadata.xml]Failed to get resource: GET. [http http/1.1 400 Bad Request: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/nineoldandroIDs/library/]Resource missing. [http GET: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/androID/support/appcompat-v7/maven-Metadata.xml]Failed to get resource: GET. [http http/1.1 400 Bad Request: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/androID/support/appcompat-v7/]Resource missing. [http GET: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/crashlytics/androID/crashlytics/maven-Metadata.xml]Failed to get resource: GET. [http http/1.1 400 Bad Request: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/crashlytics/androID/crashlytics/]Resource missing. [http GET: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/nineoldandroIDs/library/maven-Metadata.xml]Failed to get resource: GET. [http http/1.1 400 Bad Request: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/nineoldandroIDs/library/]Resource missing. [http GET: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/androID/support/appcompat-v7/maven-Metadata.xml]Failed to get resource: GET. [http http/1.1 400 Bad Request: https://raw.github.com/fernandezpablo85/scribe-java/mvn-repo/com/androID/support/appcompat-v7/]
@H_404_2@它试图从scribe存储库中检索crashlytics文件.

解决方法 按声明的顺序搜索存储库,直到找到依赖关系.如果在scribe存储库中搜索crashlytics库,则意味着在crashlytics存储库中找不到它. 总结

以上是内存溢出为你收集整理的android – Gradle自定义存储库和依赖项解析全部内容,希望文章能够帮你解决android – Gradle自定义存储库和依赖项解析所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1138208.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存