问题
I've just updated Android SDK and now my project gives this error. How can I solve it? Thanks in advance
Error:Could not find com.android.tools.build:gradle:3.0.0-alpha4.
Searched in the following locations:
file:/C:/Program Files/Android/Android Studio
3/gradle/m2repository/com/android/tools/build/gradle/3.0.0-alpha4/gradle-
3.0.0-alpha4.pom
file:/C:/Program Files/Android/Android Studio
3/gradle/m2repository/com/android/tools/build/gradle/3.0.0-alpha4/gradle-
3.0.0-alpha4.jar
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-
alpha4/gradle-3.0.0-alpha4.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-
alpha4/gradle-3.0.0-alpha4.jar
Required by:
project :
回答1:
You should read migration guide
Change you build.gradle:
buildscript {
repositories {
...
// You need to add the following repository to download the
// new plugin.
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha4'
}
}
来源:https://stackoverflow.com/questions/44943890/error-after-sdk-update