【问题标题】:I got Flutter Build time and runtime error - Execution failed for task ':background_locator:compileDebugKotlin'我收到 Flutter 构建时间和运行时错误 - 任务“:background_locator:compileDebugKotlin”执行失败
【发布时间】:2022-06-27 17:46:04
【问题描述】:

我收到 Flutter 构建时间和运行时错误 - 任务 ':background_locator:compileDebugKotlin' 执行失败。

当我尝试运行应用程序时出现如下错误,请帮助我。

请谁能帮我解决这个问题。

下面是我的颤振医生 -v 输出。 PS D:__>扑医生-v

[√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.19044.1706], locale en-IN)
    • Flutter version 3.0.1 at D:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fb57da5f94 (8 days ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\Dev_Flutter\AppData\Local\Android\sdk
    • Platform android-32, build-tools 31.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.0)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.1.32210.238
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2020.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[√] VS Code (version 1.67.2)
    • VS Code at C:\Users\Dev_Flutter\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.40.0

[√] Connected device (4 available)
    • CPH2127 (mobile)  • 1cb8d2b1 • android-arm64  • Android 11 (API 30)
    • Windows (desktop) • windows  • windows-x64    • Microsoft Windows [Version 10.0.19044.1706]
    • Chrome (web)      • chrome   • web-javascript • Google Chrome 101.0.4951.67
    • Edge (web)        • edge     • web-javascript • Microsoft Edge 101.0.1210.39

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

【问题讨论】:

标签: flutter


【解决方案1】:

在你的项目目录中尝试这个命令:

Flutter Pub 升级

您导入的包和您使用的 Flutter 版本之间可能存在不一致。此命令会将您的软件包升级到最新的可行版本。

另外,请提供有助于找到解决方案的 Flutter 医生输出。

【讨论】:

  • 好的,我将更新问题,将颤振医生输出。
  • 正如 Dabbel 在您的问题下的评论中提到的那样,似乎该软件包在 Flutter 3 上有问题 该问题在此处报告:github.com/rekabhq/background_locator/issues/333
猜你喜欢
  • 2021-12-25
  • 2021-06-19
  • 1970-01-01
  • 2018-06-18
  • 2018-07-24
  • 2017-11-09
  • 1970-01-01
  • 1970-01-01
  • 2021-08-12
相关资源
最近更新 更多