【问题标题】:Error while debugging first app in flutter using a real device使用真实设备在颤振中调试第一个应用程序时出错
【发布时间】:2020-08-28 15:20:05
【问题描述】:

我在 Ubuntu 20.04 中使用没有 Android Studio 的 VS 代码。在真实设备中以调试模式运行第一个应用程序时,会产生以下错误。我也尝试更改我的 JDK 版本,但没有成功。

Launching lib/main.dart on Nokia 6 1 Plus in debug mode...

FAILURE: Build failed with an exception.                                

* What went wrong:                                                      
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper    

* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org                              

BUILD FAILED in 12s                                                     
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        18.3s
Exception: Gradle task assembleDebug failed with exit code 1

请提出解决方案!

【问题讨论】:

    标签: java flutter gradle vscode-debugger


    【解决方案1】:

    由于某种原因,您的 gradle 同步失败。 这样做

    1. 文件 > 打开
    2. 导航到您的项目
    3. 你会看到一个 android 文件夹在新窗口中打开,作为项目
    4. 检查 gradle 同步问题并解决这些问题

    【讨论】:

      猜你喜欢
      • 2019-10-16
      • 2021-12-16
      • 2021-06-30
      • 2019-12-30
      • 2022-10-06
      • 1970-01-01
      • 2021-11-05
      • 2020-03-15
      • 2012-10-15
      相关资源
      最近更新 更多