我正在开发的项目需要
scribe-java和
crashlytics库.这两个库都可以从自定义存储库中获得.
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' ... }
使用这样的设置存储库解决方案在构建过程中变得混乱,以至于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.0 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/] 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/]
它试图从scribe存储库中检索crashlytics文件.