android stadio 编译报错:download fastutil-7.2.0.jar

在Ubuntu上面,新安装的stadio,第一次编译项目的时候,
一直开在下载 fastutil-7.2.0.jar

原因是需要翻墙。那么改一下你的buil.gradle

buildscript {
    
    repositories {
        maven{ url = "http://maven.aliyun.com/nexus/content/groups/public/" }
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven{ url = "http://maven.aliyun.com/nexus/content/groups/public/" }
        google()
        jcenter()
    }
}
原文地址:https://www.cnblogs.com/caoxinyu/p/10568462.html