2018-07-04

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



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

dependencies {

                compile fileTree(dir:'libs',include: ['*.jar'])

                androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {

                excludegroup:'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()    }

}


原作者:https://blog.csdn.net/MoLiao2046/article/details/78580293?locationNum=6&fps=1

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容