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

FormatException: FormatException: Bad UTF-8 encoding 0xe4 (at offset 9) #20853

Closed jzoom closed 6 years ago

jzoom commented 6 years ago

Steps to Reproduce

  1. System : Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.228], locale zh-CN)
  2. git clone https://github.com/best-flutter/flutter_jpush
  3. cd ./flutter_jpush/example 4.run : flutter build api --debug

Logs

command

flutter build apk --debug

exception

FormatException: FormatException: Bad UTF-8 encoding 0xe4 (at offset 9)

#0      _Utf8Decoder.convert (dart:convert/utf.dart:490)
#1      _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:345)
#2      _Utf8ConversionSink.add (dart:convert/string_conversion.dart:341)
#3      _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:86)
#4      _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120)
#5      _rootRunUnary (dart:async/zone.dart:1134)
#6      _CustomZone.runUnary (dart:async/zone.dart:1031)
#7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:933)
#8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330)
#9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:257)
#10     _StreamController&&_SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:763)
#11     _StreamController._add (dart:async/stream_controller.dart:639)
#12     _StreamController.add (dart:async/stream_controller.dart:585)
#13     _Socket._onData (dart:io-patch/socket_patch.dart:1672)
#14     _rootRunUnary (dart:async/zone.dart:1138)
#15     _CustomZone.runUnary (dart:async/zone.dart:1031)
#16     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933)
#17     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330)
#18     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:257)
#19     _StreamController&&_SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:763)
#20     _StreamController._add (dart:async/stream_controller.dart:639)
#21     _StreamController.add (dart:async/stream_controller.dart:585)
#22     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1245)
#23     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:797)
#24     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#25     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#26     _runPendingImmediateCallback (dart:isolate-patch/dart:isolate/isolate_patch.dart:113)
#27     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:166)

flutter doctor

[✓] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.228], locale zh-CN)
    • Flutter version 0.5.1 at D:\Android\flutter
    • Framework revision c7ea3ca377 (3 months ago), 2018-05-29 21:07:33 +0200
    • Engine revision 1ed25ca7b7
    • Dart version 2.0.0-dev.58.0.flutter-f981f09760

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

[✓] Android Studio (version 3.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 27.1.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[!] IntelliJ IDEA Ultimate Edition (version 2018.1)
    • IntelliJ at D:\Program Files\JetBrains\IntelliJ IDEA 2018.1.3
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[!] VS Code, 64-bit edition (version 1.25.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[!] Connected devices
    ! No devices available

! Doctor found issues in 3 categories.
zoechi commented 6 years ago

Closing as dup of #15646. Please just add a comment if you don't agree, otherwise upvote #15646.

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.