gpt4 book ai didi

android - 任务 ':fluttertoast:compileDebugKotlin' 执行失败

转载 作者:行者123 更新时间:2023-12-03 17:43:59 26 4
gpt4 key购买 nike

关闭。这个问题需要debugging details .它目前不接受答案。












编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将帮助其他人回答问题。


去年关闭。







Improve this question



  • 我试过flutter clean
  • flutter pub cache repair ,
  • fluttertoast 包的更改和版本,并删除它,
  • 删除 android/.gradle 目录并重建。

  • 没有任何效果。
    Launching lib\main.dart on Redmi Note 4 in debug mode...
    lib\main.dart:1
    Parameter format not correct -
    e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\fluttertoast-7.1.8\android\src\main\kotlin\io\github\ponnamkarthik\toast\fluttertoast\MethodCallHandlerImpl.kt: (45, 84): Unresolved reference: R
    e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\fluttertoast-7.1.8\android\src\main\kotlin\io\github\ponnamkarthik\toast\fluttertoast\MethodCallHandlerImpl.kt: (70, 68): Unresolved reference: R
    e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\fluttertoast-7.1.8\android\src\main\kotlin\io\github\ponnamkarthik\toast\fluttertoast\MethodCallHandlerImpl.kt: (85, 64): Unresolved reference: R
    2

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':fluttertoast:compileDebugKotlin'.
    > Compilation error. See log for more details

    * 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 39s
    Exception: Gradle task assembleDebug failed with exit code 1
    Exited (sigterm)

    最佳答案

    更新compileSdkVersion30在我的app/build.gradle解决了它并允许我保留最新的gradle。
    旧答案:
    我不知道为什么,但我能够通过回滚来解决问题

    classpath 'com.android.tools.build:gradle:3.5.4'
    在我的顶层 build.gradle .

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

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