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

но все еще не работает, что мне делать, чтобы это исправить?

1
0
1 398
2
Перейти к ответу Данный вопрос помечен как решенный

Ответы 2

Ответ принят как подходящий

Измените его на флаттертост: 7.1.5 Запустите Pub, получите и запустите свой проект После этого вы можете изменить на fluttertoast: ^ 7.1.6 Очевидно, это не лучший способ исправить эту ошибку, но у меня это работает. Удачи

Попробуйте выполнить следующие команды:

flutter clean
flutter pub get

Другие вопросы по теме