dart - ponnamkarthik/toast/fluttertoast/MethodCallHandlerImpl.kt 编译颤振时
问题描述
当我编译我的颤振项目时,它显示:
To see a detailed report, use the --untranslated-messages-file
option in the tool to generate a JSON format file containing
all messages that need to be translated.
Launching lib/main.dart on sdk gphone x86 arm in debug mode...
Running Gradle task 'assembleDebug'...
e: /home/dolphin/apps/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-7.1.5/android/src/main/kotlin/io/github/ponnamkarthik/toast/fluttertoast/MethodCallHandlerImpl.kt: (16, 16): Redeclaration: MethodCallHandlerImpl
e: /home/dolphin/apps/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-7.1.6/android/src/main/kotlin/io/github/ponnamkarthik/toast/fluttertoast/MethodCallHandlerImpl.kt: (17, 16): Redeclaration: MethodCallHandlerImpl
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 7s
Exception: Gradle task assembleDebug failed with exit code 1
它现在工作正常,然后我尝试升级 fluttertoast
:
fluttertoast: ^7.1.6
但仍然无法正常工作,我该怎么做才能解决它?
解决方案
将其更改为 fluttertoast:7.1.5 运行 Pub 获取并运行您的项目之后,您可以更改为 fluttertoast:^7.1.6 显然这不是修复此错误的最佳方法,但它对我有用。祝你好运
推荐阅读
- php - 我真的可以对致命的解析错误无所事事吗?
- lldb - 调试交互式命令行程序时返回 lldb 提示符
- sdl - SDL_Scancode 和 SDL_Keycode 之间的区别
- android - Flutter listview:移除一个Item时,下一个继承一些属性
- database - Xamarin SQLite 数据库的 GUI
- python - 使用一个列表理解后是否有可能继续在我的列表中添加元素?
- haskell - 如何更改函数签名
- angular - 您如何正确地从对象中获取值并将其添加到另一个值 | 角
- html - 我的 mp4 不会像以前那样显示在烧瓶中
- python - 遵循 TensorFlow 教程 - 关于 IMG_SIZE 和图像大小一致性的问题