Bootstrap

在AndroidStudio中新建项目时遇到的Gradle下载慢问题,配置错的按我的来,镜像地址不知道哪个网页找的,最主要下载要快

android-studio-2024.2.1.11-windows    Android 移动应用开发者工具 – Android 开发者  |  Android Developers

https://r4---sn-j5o76n7z.gvt1-cn.com/edgedl/android/studio/install/2024.2.1.11/android-studio-2024.2.1.11-windows.exe?cms_redirect=yes&met=1731775941,&mh=iF&mip=163.125.199.217&mm=28&mn=sn-j5o76n7z&ms=nvh&mt=1731775458&mv=m&mvi=4&pl=24&rmhost=r3---sn-j5o76n7z.gvt1-cn.com&rms=nvh,nvh&shardbypass=sd&smhost=r3---sn-j5o7dn7s.gvt1-cn.com

不会安装看教程

保姆级别安装2024最新版Android studio环境的方法_androidstudio2024最新版安装教程-CSDN博客

gradle-8.9-all下载地址

https://mirrors.aliyun.com/gradle/distributions/v8.9.0/gradle-8.9-all.zip?spm=a2c6h.25603864.0.0.7ee7501aPFvJul

jdk21下载地址

https://download.oracle.com/java/21/latest/jdk-21_windows-x64_bin.zip

随便建个项目

下一步

完成

构建停掉

点击文件 - 设置

第一步  本地安装-配置-解压的gradle的路径

第二步 复制进配置gradle-wrapper.properties文件

distributionUrl=https\://mirrors.aliyun.com/gradle/distributions/v8.9.0/gradle-8.9-bin.zip

#Sun Nov 17 00:44:51 CST 2024
#配置gradle-wrapper.properties文件
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://mirrors.aliyun.com/gradle/distributions/v8.9.0/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

第三步 打开settings.gradle.kts 复制进去

#打开 Android Studio 工程文件,找到 settings.gradle.kts
pluginManagement {
    repositories {

        maven { url=uri ("https://maven.aliyun.com/repository/releases")}
        maven { url=uri ("https://maven.aliyun.com/repository/google")}
        maven { url=uri ("https://maven.aliyun.com/repository/central")}
        maven { url=uri ("https://maven.aliyun.com/repository/gradle-plugin")}
        maven { url=uri ("https://maven.aliyun.com/repository/public")}
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {

        maven { url=uri ("https://maven.aliyun.com/repository/releases")}
        maven { url=uri ("https://maven.aliyun.com/repository/google")}
        maven { url=uri ("https://maven.aliyun.com/repository/central")}
        maven { url=uri ("https://maven.aliyun.com/repository/gradle-plugin")}
        maven { url=uri ("https://maven.aliyun.com/repository/public")}
        google()
        mavenCentral()
    }
}

rootProject.name = "My Application"
include(":app")

重新构建项目就行了

;