Could not install Gradle distribution

New computer, new Android studio 4.2, new first project error:

Could not install Gradle distribution from 'https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip'

Solution:
(1) click the link in the error message:
1 https://services.gradle.org/distributions/gradle-6.7.1-bin.zip
Download the compressed package to the specified path and unzip it
(2) click file — & gt; Settings-> Build, Execution,Deployment-> Build Tools-> Gradle, in the gradle projects area, change use gradle from to your own download path, retry:

(3) Successful solution:

--

--

So, here’s my gitignore file (For android studio 3.0):

#built application files
*.apk
*.ap_
*.aab

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/

# Local configuration file (sdk path, etc)
local.properties

# Windows thumbnail db
Thumbs.db

# OSX files
.DS_Store

# Android Studio
#*.iml
#.idea
#.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
.gradle
build/
.navigation
captures/
output.json

#NDK
obj/
.externalNativeBuild

Since Android Studio 2.2 and up to 3.0, new projects are created with this gitignore file:

*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild

Deprecated — for older project format, add this section to your gitignore file:

/*/out
/*/*/build
/*/*/production
*.iws
*.ipr
*~
*.swp

This file should be located in the project’s root folder and not inside the project’s module folder.

--

--