报错:Error:Failed to resolve: com.android.support:support-annotations:26.0.0 & Error:(34, 13) Fail...

出现问题的原因

support annotations自25.4.0之后support包不在sdk中更新了,需要用谷歌的maven库,在Project的build.gradle中添加如下谷歌的地址,因此需要我们手动的在Project的build.gradle中添加如下谷歌的地址:

allprojects {

  repositories {

    ...

    //需要添加的部分 

    maven { url "https://maven.google.com"}

    maven { url "https://dl.google.com/dl/android/maven2/"}

    ...

  }

}


你可能感兴趣的:(报错:Error:Failed to resolve: com.android.support:support-annotations:26.0.0 & Error:(34, 13) Fail...)