打开根目录build.gradle

buildscript {
   
 
    repositories {
        // 添加阿里云 maven 地址
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
 
        google()
        jcenter()
     
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
    }
}
 
allprojects {
    repositories {
        // 添加阿里云 maven 地址
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
 
        google()
        jcenter()
    
        maven { url 'https://jitpack.io' }
    }
}
 
task clean(type: Delete) {
    delete rootProject.buildDir
}

 删除项目文件夹里的.gradle文件夹,重新打开android studio

相关文章:

  • 2021-07-11
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
  • 2021-07-30
  • 2021-09-16
  • 2021-09-30
  • 2022-12-23
猜你喜欢
  • 2021-09-13
  • 2021-10-12
  • 2021-08-06
  • 2022-12-23
  • 2021-04-20
相关资源
相似解决方案