修改gradle镜像地址
路径: android/build.gradle,修改build.gradle文件
buildscript {
repositories {
//google()
//mavenCentral()
maven{ url 'https://maven.aliyun.com/repository/google' }
maven{ url 'https://maven.aliyun.com/repository/jcenter' }
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public'}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
}
}
allprojects {
repositories {
//google()
//mavenCentral()
maven{ url 'https://maven.aliyun.com/repository/google' }
maven{ url 'https://maven.aliyun.com/repository/jcenter' }
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public'}
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
修改Flutter的Gradle运行地址
修改文件:android/gradlew.bat,因为默认是在C盘,会比较占用C盘的资源,所以更换一下运行环境地址
set GRADLE_OPTS="-Dgradle.user.home=D:/home/document/gradle"