Error after SDK update

ぐ巨炮叔叔 提交于 2019-12-24 10:00:52

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!