Launching lib/main.dart on Android SDK built for arm64 in debug mode…
Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached waiting for exclusive access to file: /Users/DIGITAL_VASANTH/.gradle/wrapper/dists/gradle-7.6.3-all/aocdy2d2z8kodnny3rsumj8i8/gradle-7.6.3-all.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.
I have tried to reflect the code in app emulator, but this error had raised while running the code in vscode
2
Answers
This usually happens because of broken
gradle
files/installation, you need to delete the.gradle
folder and run the flutter app again.Windows:
C:Users<user>.gradle
Mac:
/home/<user>/.gradle
Do not disconnect your device, it might take a little longer because gradle dependencies will be downloaded again.
Check Gradle Version In The Project in this Project Path
and change it to gradle installed in your PC in this Path
Then open Project Terminal And type This