Failed to resolve: com.android.support:appcompat-v7:27.+ 报错解决方法

点点圈 提交于 2021-01-10 22:49:16

app module build.gradle dependencies中默认配置如下:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:27.+' compile 'com.android.support.constraint:constraint-layout:1.0.2' testCompile 'junit:junit:4.12' }

 

Studio 2.3版本应该在Root Project build.gradle allprojects配置如下:

allprojects {
    repositories {
        jcenter()
        maven { url "https://maven.google.com" }
    }
}

Studio 3.0版本应该在Root Project build.gradle allprojects配置如下:

allprojects {
    repositories {
        jcenter()
        google()
    }
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!