gpt4 book ai didi

android - Flutter:任务 ':app:compileDebugKotlin' 执行失败

转载 作者:行者123 更新时间:2023-12-03 04:25:48 25 4
gpt4 key购买 nike

我尝试从 运行默认的 flutter 应用程序 flutter 创建 在我的 android 设备上,但它给我一个错误。有人可以帮忙吗?

Launching lib\main.dart on SM G610F in debug mode... Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:compileDebugKotlin'.

    Could not resolve all artifacts for configuration ':app:debugCompileClasspath'. . . .

  • 尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。
  • https://help.gradle.org 获得更多帮助


  • BUILD FAILED in 14s Finished with error: Gradle task assembleDebug
    退出代码 1 失败

    这是我的 flutter 医生:

    [√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.10586], locale en-US) • Flutter version 1.12.13+hotfix.5 at E:\flutter\flutter • Framework revision 27321ebbad (6 weeks ago), 2019-12-10 18:15:01 -0800 • Engine revision 2994f7e1e6 • Dart version 2.7.0

    [√] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at C:\Users\208046\AppData\Local\Android\sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.2 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03) • All Android licenses accepted.

    [√] Android Studio (version 3.5) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 42.1.1 • Dart plugin version 191.8593 • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

    [√] VS Code, 64-bit edition (version 1.41.1) • VS Code at C:\Program Files\Microsoft VS Code • Flutter extension version 3.7.1

    [√] Connected device (1 available) • SM G610F • 33005566b2b5c3df • android-arm • Android 8.1.0 (API 27)

    • No issues found!



    编辑:对于我的完整日志,您可以在这里看到:

    Flutter github issues

最佳答案

转到您的 build.gradle Android 目录根目录下的文件并升级您的Kotlin_version到最新。截至打字时,最新的是 1.5.10,所以它应该是这样的:

ext.kotlin_version = '1.5.10'

关于android - Flutter:任务 ':app:compileDebugKotlin' 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59893018/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com