Utf-8 error occurred when flutter started debugging, ask for solutions

Project startup and debugging reported this error:

Launching libmain.dart on Android SDK built for x86 in debug mode.
FormatException: Bad UTF-8 encoding 0xc2 (at offset 116)
Exited (sigterm)

there is no more detailed information, do you have a solution?

Apr.05,2021

this is the reason why some characters in your source file cannot be recognized as UTF8, but your file encoding is UTF8

Command line tapping

cd android

windows:

gradlew.bat assDebug --stacktrace

Class unix:

./gradlew assDebug --stacktrace

then according to the log, you can see which file has a problem
this is the location of the prompt offset 116

Menu