【问题标题】:Having error in gradle in running flutter app in vscode在vscode中运行flutter应用程序时出现gradle错误
【发布时间】:2020-10-10 08:45:58
【问题描述】:

当使用 vysor 从 vscode 运行我创建的应用程序到实际的 android 手机时,我收到此错误:

> Launching lib\main.dart on RMX2020 in debug mode...
Exception in thread "main" java.lang.RuntimeException: Timeout of 120000 reached waiting for exclusive access to file: C:\Users\Rhea Baja\.gradle\wrapper\dists\gradle-5.6.2-all\9st6wgf78h16so49nn74lgtbb\gradle-5.6.2-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\Rhea Baja\.gradle\wrapper\dists\gradle-5.6.2-all\9st6wgf78h16so49nn74lgtbb\gradle-5.6.2-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)

Here is the error

【问题讨论】:

标签: java android gradle visual-studio-code


【解决方案1】:

您需要稳定的互联网连接才能下载某些内容。 它会自动下载并安装以下内容并运行您的应用程序:

    Launching lib\main.dart on sdk gphone x86 in debug mode...
Checking the license for package Android SDK Build-Tools 29.0.2 in C:\Users\Lenovo\AppData\Local\Android\sdk\licenses
License for package Android SDK Build-Tools 29.0.2 accepted.
Preparing "Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)".
"Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" ready.
Installing Android SDK Build-Tools 29.0.2 in C:\Users\Lenovo\AppData\Local\Android\sdk\build-tools\29.0.2
"Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" complete.
"Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" finished.
Checking the license for package Android SDK Platform 30 in C:\Users\Lenovo\AppData\Local\Android\sdk\licenses
License for package Android SDK Platform 30 accepted.
Preparing "Install Android SDK Platform 30 (revision: 3)".
"Install Android SDK Platform 30 (revision: 3)" ready.
Installing Android SDK Platform 30 in C:\Users\Lenovo\AppData\Local\Android\sdk\platforms\android-30   
"Install Android SDK Platform 30 (revision: 3)" complete.
"Install Android SDK Platform 30 (revision: 3)" finished.
Running Gradle task 'assembleDebug'...                            810.6s
√  Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...              1,297ms
W/FlutterActivityAndFragmentDelegate( 7450): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
Syncing files to device sdk gphone x86...                          746ms

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-08-24
    • 1970-01-01
    • 2020-09-19
    • 2022-06-25
    • 2020-08-09
    • 1970-01-01
    • 2020-10-23
    相关资源
    最近更新 更多