flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.19k stars 27.49k forks source link

Bad UTF-8 encoding 0xc3 (at offset 201) #31542

Closed lljxx1 closed 5 years ago

lljxx1 commented 5 years ago

command

flutter build apk

exception

FormatException: FormatException: Bad UTF-8 encoding 0xc3 (at offset 201)

#0      _Utf8Decoder.convert (dart:convert/utf.dart:434:15)
#1      _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:311:14)
#2      _Utf8ConversionSink.add (dart:convert/string_conversion.dart:307:5)
#3      _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:74:18)
#4      _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#5      _rootRunUnary (dart:async/zone.dart:1132:38)
#6      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#10     _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#11     _StreamController._add (dart:async/stream_controller.dart:640:7)
#12     _StreamController.add (dart:async/stream_controller.dart:586:5)
#13     _Socket._onData (dart:io/runtime/binsocket_patch.dart:1722:41)
#14     _rootRunUnary (dart:async/zone.dart:1136:13)
#15     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#16     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#17     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#18     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#19     _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#20     _StreamController._add (dart:async/stream_controller.dart:640:7)
#21     _StreamController.add (dart:async/stream_controller.dart:586:5)
#22     new _RawSocket.<anonymous closure> (dart:io/runtime/binsocket_patch.dart:1284:33)
#23     _NativeSocket.issueReadEvent.issue (dart:io/runtime/binsocket_patch.dart:826:14)
#24     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#25     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#26     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#27     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)

flutter doctor

[✓] Flutter (Channel unknown, v1.1.5, on Microsoft Windows [Version 10.0.17134.706], locale zh-CN)
    • Flutter version 1.1.5 at C:\Users\fun\Documents\flutter-git\1.1.5
    • Framework revision 63b2daff7f (4 months ago), 2018-12-28 10:43:06 -0800
    • Engine revision f0a1d6f91d
    • Dart version 2.1.1 (build 2.1.1-dev.0.1 d1817ddc91)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\fun\Documents\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = C:\Users\fun\Documents\sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] Android Studio (version 3.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] VS Code (version 1.33.1)
    • VS Code at C:\Users\fun\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 2.25.1

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)

• No issues found!
lljxx1 commented 5 years ago

upgrade flutter 1.5.3 can slove this problem

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.