Exception in thread “main” java.lang.RuntimeException: Timeout of 120000 reached waiting for exclusive access to file: C: \ Users \ Administrator gradle \ wrapper \ dists \ gradle – 6.7 – all \ cuy9mc7upwgwgeb72wkcrupxe \ gradle – 6.7 – all the zip

at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:61) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

[!] Gradle threw an error while downloading artifacts from the network. Retrying to download…

A new project created by Flutter Android will most likely have the following problem when it runs for the first time: we need to find the following files

image.png

Modify the original part

DistributionUrl =file\:///c:/gradle-6.5.1-all.zip // Here is the new change # distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zipCopy the code

Gradle 6.5.1 – all.zip files can be downloaded from the default link above services.gradle.org/distributio… // Note that the backslash after HTTPS is removed

Once downloaded, place it in the path modified above and run the project.

www.bilibili.com/video/av374… Video explanation link