본문 바로가기
Mobile Programming

문제해결: Bad UTF-8 encoding (U+FFFD; REPLACEMENT CHARACTER) found while decoding string:

by 맑은안개 2022. 5. 30.

PC포맷과 함께 Flutter 3.10, Visual Studio 2022( develop for Windows with C++ ) 을 설치 한 뒤 

flutter doctor를 수행한 결과 아래와 같은 오류 발생.

 

C:\src\flutter>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.19044.1706], locale ko-KR)
[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[√] Chrome - develop for the web
[☠] Visual Studio - develop for Windows (the doctor check crashed)
    X Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know
      about this issue at https://github.com/flutter/flutter/issues.
    X Exception: Bad UTF-8 encoding (U+FFFD; REPLACEMENT CHARACTER) found while decoding string: [

 

구글링 결과 Flutter github에 Issue로 등록되었고 close된 상태이다.

현재 임시방편으로 Visual Studio의 vswhere.exe 패치파일을 덮어쓰는 방법으로 close 되어 있다. 

https://github.com/flutter/flutter/issues/102451

 

[windows] Exception: Bad UTF-8 encoding when running flutter doctor or building/running for Windows · Issue #102451 · flutter/

Steps to Reproduce Set your windows locale to german Install the Visual Studio 2022 Build Tools Install the latest flutter beta (beta, 2.13.0-0.2.pre) Run flutter doctor > Temporary solution Log...

github.com

 

궁극적으로 아래 사이트에서 vswhere.exe파일을 다운받아 Program Files (x86)/Microsoft Visual Studio/Installer 경로에 덮어쓰면 해결 된다.

https://github.com/microsoft/vswhere/releases

 

Releases · microsoft/vswhere

Locate Visual Studio 2017 and newer installations. Contribute to microsoft/vswhere development by creating an account on GitHub.

github.com

재부팅 없이 바로 flutter doctor명령을 재실행, 해당 문제가 해결된 것을 확인 할 수 있다.

C:\src\flutter>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.19044.1706], locale ko-KR)
[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.2)
[!] Android Studio (not installed)
[√] VS Code (version 1.67.2)
[√] Connected device (3 available)
[√] HTTP Host Availability

! Doctor found issues in 2 categories.
반응형