obsidian/笔记文件/2.笔记/安卓Studio gradle下载源 修改 国内.md
2025-03-26 00:02:56 +08:00

52 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#安卓
其中,一个是腾讯的,一个是阿里的
修改源 链接 参考:
```
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-6.1.1-bin.zip
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-6.2.1-bin.zip
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-7.2-bin.zip
```
build gradle的源修改参考
```
allprojects {
buildscript {
repositories {
maven { url = uri("https://maven.aliyun.com/repository/public") }
maven { url = uri("https://maven.aliyun.com/repository/google") }
google()
jcenter()
}
dependencies {
// If you are changing the Android Gradle Plugin version, make sure it is compatible with the Gradle version preinstalled with Unity
// See which Gradle version is preinstalled with Unity here https://docs.unity3d.com/Manual/android-gradle-overview.html
// See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
// To specify a custom Gradle version in Unity, go do "Preferences > External Tools", uncheck "Gradle Installed with Unity (recommended)" and specify a path to a custom Gradle version
classpath 'com.android.tools.build:gradle:4.0.1'
}
}
repositories {
maven { url = uri("https://maven.aliyun.com/repository/public") }
maven { url = uri("https://maven.aliyun.com/repository/google") }
google()
jcenter()
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
```