androidstudio导入项目后,报错:Could not find com.android.tools.build:gradle:3.1.0.
解决办法:
项目根目录的 build.gradle文件中添加其他可供下载的仓库:google()、 jcenter()、mavenCentral()
Could not find com.android.tools.build:gradle:3.1.0.

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
}

相关文章:

  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
  • 2021-06-02
  • 2021-10-05
  • 2022-12-23
  • 2021-09-12
  • 2022-01-01
猜你喜欢
  • 2021-12-29
  • 2021-12-20
  • 2021-07-08
  • 2021-08-19
  • 2021-04-09
  • 2021-10-03
相关资源
相似解决方案