美文网首页
Error:Failed to resolve: com.and

Error:Failed to resolve: com.and

作者: 小小程序员jh | 来源:发表于2018-09-10 10:15 被阅读31次

android studio 2.3版本下创建应用构建失败,特此记录下:

Error:Failed to resolve: com.android.support:support-annotations:26.1.0
        Install Repository and sync project
        Open File
        Show in Project Structure dialog

解决方案:
https://stackoverflow.com/questions/46023971/failed-to-resolve-com-android-supportsupport-annotations-26-0-1
重点是这个地方:
All current editions of Google libraries reside in Google's Maven repository (maven.google.com), not in the old offline-capable support repositories.

In your project-level build.gradle file, make sure that your allprojects closure looks like this:

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

or, on Android Studio 3.0+, like this:

allprojects {
    repositories {
        jcenter()
        google()
    }
}

相关文章

网友评论

      本文标题:Error:Failed to resolve: com.and

      本文链接:https://www.haomeiwen.com/subject/zigjgftx.html