FVM 安装错误 FormatException:无效的 UTF-8 字节(偏移量 5)

问题描述 投票:0回答:2

我尝试通过fvm下载flutter sdk,但不允许出现此错误

C:\>fvm install stable Creating local mirror... Unhandled exception: FormatException: Invalid UTF-8 byte (at offset 5) #0      _Utf8Decoder.convertChunked (dart:convert-patch/convert_patch.dart:1851) #1      _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:304) #2      _Utf8ConversionSink.add (dart:convert/string_conversion.dart:300) #3      _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:69) #4      _SinkTransformerStreamSubscription._handleData          ] #5      _rootRunUnary (dart:async/zone.dart:1407) #6      _CustomZone.runUnary (dart:async/zone.dart:1308) #7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1217) #8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339) #9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271) #10     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:784) #11     _StreamController._add (dart:async/stream_controller.dart:658) #12     _StreamController.add (dart:async/stream_controller.dart:606) #13     _Socket._onData (dart:io-patch/socket_patch.dart:2447) #14     _rootRunUnary (dart:async/zone.dart:1415) #15     _CustomZone.runUnary (dart:async/zone.dart:1308) #16     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1217) #17     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339) #18     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271) #19     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:784) #20     _StreamController._add (dart:async/stream_controller.dart:658) #21     _StreamController.add (dart:async/stream_controller.dart:606) #22     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1936) #23     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1379) #24     _microtaskLoop (dart:async/schedule_microtask.dart:40) #25     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49) #26     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:123) #27     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:190)

我该如何修复它?

窗口重置和cmd管理员尝试以及powershell管理员

flutter fvm
2个回答
0
投票

首先,如果您使用的是 Windows,则需要

choco install fvm
。 然后在 FLUTTER PROJECT 中运行
fmv use stable
(或特定版本),而不是在 C 盘中。


0
投票

我也有同样的问题。你解决这个问题了吗?

© www.soinside.com 2019 - 2024. All rights reserved.