安卓错误Could not resolve all files for configuration ':app:debugCompileClasspath'.等

 What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find any version that matches com.android.support:support-annotations:27.+.
  Versions that do not match:
      26.0.0-alpha1
      25.3.1
      25.3.0
      25.2.0
      25.1.1
      + 28 more
  Searched in the following locations:
      file:/E:/Soft/AndroidSDK/android-sdk-windows/extras/m2repository/com/android/support/support-annotations/maven-metadata.xml
      file:/E:/Soft/AndroidSDK/android-sdk-windows/extras/m2repository/com/android/support/support-annotations/
      file:/E:/Soft/AndroidSDK/android-sdk-windows/extras/google/m2repository/com/android/support/support-annotations/maven-metadata.xml
      file:/E:/Soft/AndroidSDK/android-sdk-windows/extras/google/m2repository/com/android/support/support-annotations/
      file:/E:/Soft/AndroidSDK/android-sdk-windows/extras/android/m2repository/com/android/support/support-annotations/maven-metadata.xml
 

 

加一个maven库在build.gradle的

buildscript {
    repositories {

allprojects {
    repositories {

  

maven{ url 'https://maven.aliyun.com/repository/google'}

版权声明:本文为ch953181172原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。