Launching lib\main.dart on SM G615F in debug mode...
lib\main.dart:1
Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached waiting for exclusive access to file: C:\Users\Me\.gradle\wrapper\dists\gradle-6.7-all\cuy9mc7upwgwgeb72wkcrupxe\gradle-6.7-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. Retrying to download...
Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached waiting for exclusive access to file: C:\Users\Shaad\.gradle\wrapper\dists\gradle-6.7-all\cuy9mc7upwgwgeb72wkcrupxe\gradle-6.7-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. Retrying to download...
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
你能帮我解决这个问题吗?我正在获取Gradle任务 assembleDebug 错误,也当我在物理设备上运行Flutter时,它需要这么多时间来运行和执行。
我想在这方面寻求帮助。
1条答案
按热度按时间1dkrff031#
这可能是由于损坏的
gradle
安装或缓慢的互联网。解决方案:
删除位于Windows的**
.gradle
文件夹:C:\Users\<user>\.gradle
或Mac**:/home/<user>/.gradle
然后再次运行Flutter应用程序。
由于将再次下载gradle依赖项,因此可能需要更长时间。请不要断开您的设备。