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()
}
}