编译时android studio gradle错误

时间:2018-12-11 09:21:03

标签: android android-gradle

我的Android Studio在尝试编译时给了我错误,自从一段时间以来一直在工作,但是最近它给了我这个错误:

Could not find any matches for com.android.tools.build:gradle:+ as no versions of com.android.tools.build:gradle are available.
Searched in the following locations:
    https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml
    https://jcenter.bintray.com/com/android/tools/build/gradle/
    file:/Users/macbook/.m2/repository/com/android/tools/build/gradle/maven-metadata.xml
    file:/Users/macbook/.m2/repository/com/android/tools/build/gradle/
Required by:
    unspecified:unspecified:unspecified

1 个答案:

答案 0 :(得分:0)

向您maven { url "https://dl.bintray.com/android/android-tools/" }添加android/build.gradle

buildscript {
   repositories {
        maven { url "https://dl.bintray.com/android/android-tools/"  }
   }
}