Every time Android Studio creates a new project, it will generate and download gradle-related files on the C drive by default. Due to the limited space on the C drive, the C drive will become popular soon, so you need to transfer the gradle-related files to other drives
1. Go to the C drive to find the gradle file
The specific path is generally: C:\Users\user\.gradle
2. Close Android Studio, copy gradle
Copy the contents of the C:\Users\user.gradle folder to D:\Android\Gradle
3. Configure system variables
Open computer system properties → advanced system settings → environment variables → create a new system variable, add variable name: GRADLE_USER_HOME, path: D:\Android\Gradle (subject to the actual storage path of gradle)
4. Open Android Studio and set the gradle path
In File→Settings→Build, Execution, Deployment→Build Tools→Gradle, modify the Gradle user home path to: D:\Android\Gradle (subject to the actual storage path of gradle)