Android Architecture Components 下载依赖失败

最近想要 研究Architecture Components,奈何本地的gradle一直拉不下源码。一番Google之后找到了答案,做个记录。

repositories {
    maven {
        url 'https://maven.google.com'
        // Alternative URL is 'https://dl.google.com/dl/android/maven2/'
    }
}

url 'https://maven.google.com'

替换为

url 'https://dl.google.com/dl/android/maven2/'

这就OK了,附加几个最新架构组件的依赖链接。

    //谷歌官方新架构组件
    compile "android.arch.lifecycle:runtime:1.0.0-alpha1"
    compile "android.arch.lifecycle:extensions:1.0.0-alpha1"
    annotationProcessor "android.arch.lifecycle:compiler:1.0.0-alpha1"
    //For Room
    compile "android.arch.persistence.room:runtime:1.0.0-alpha1"
    annotationProcessor "android.arch.persistence.room:compiler:1.0.0-alpha1"

你可能感兴趣的:(Android Architecture Components 下载依赖失败)