gpt4 book ai didi

flutter - 运行 Flutter Web 项目时出现问题

转载 作者:IT王子 更新时间:2023-10-29 06:42:32 26 4
gpt4 key购买 nike

我启动了一个新的 Flutter web 项目并正确执行了所有安装步骤。当我开始调试或运行它时。这是我在运行时得到的日志。它还会打开 chrome 窗口,并且屏幕上没有任何渲染。我没有修改任何预生成的文件,例如 main.dart 和其他文件。

[INFO] Connecting to the build daemon...
[INFO] Generating build script...
[INFO] Generating build script completed, took 527ms
[INFO]
[INFO] Starting daemon...
[INFO] Initializing inputs
[INFO] Reading cached asset graph...
[INFO] Reading cached asset graph completed, took 490ms
[INFO] Checking for updates since last build...
[INFO] Checking for updates since last build completed, took 1.5s
[INFO] Initializing inputs
[INFO] Reading cached asset graph...
[INFO] Reading cached asset graph completed, took 490ms
[INFO]
[INFO] Checking for updates since last build...
[INFO] Checking for updates since last build completed, took 1.5s
[INFO]
[INFO] Setting up file watchers...
[INFO] Setting up file watchers completed, took 5ms
[INFO] Registering build targets...
[INFO] Starting initial build...
[INFO] Serving DevTools at http://127.0.0.1:57020
[INFO] Starting resource servers...
[INFO] Serving `web` on http://127.0.0.1:57011
[INFO] About to build [web]...
[INFO] Running build...
[INFO] 1.0s elapsed, 0/0 actions completed.
[INFO] Running build completed, took 1.2s
[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 474ms
[INFO] Succeeded after 1.7s with 0 outputs (0 actions)
[INFO] ------------------------------------------------------------------------
Unhandled exception:
FormatException: Unexpected character (at character 1)
Not Found
^
#0 _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1392:5)
#1 _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1259:9)
#2 _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:924:22)
#3 _parseJson (dart:convert-patch/convert_patch.dart:29:10)
#4 JsonDecoder.convert (dart:convert/json.dart:493:36)
#5 JsonCodec.decode (dart:convert/json.dart:151:41)
#6 jsonDecode (dart:convert/json.dart:94:10)
#7 parse
package:source_maps/parser.dart:27
#8 Sources.scriptParsed (package:dwds/src/sources.dart:55:19)
<asynchronous suspension>
#9 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#10 CastStreamSubscription._onData (dart:_internal/async_cast.dart:81:11)
#11 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#12 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#13 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#14 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#15 _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#16 WipDomain.eventStream.<anonymous closure>.<anonymous closure> (package:webkit_inspection_protocol/webkit_inspection_protocol.dart:301:26)
#17 _HandlerEventSink.add (dart:async/stream_transformers.dart:228:7)
#18 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#19 _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
#20 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#21 _DelayedData.perform (dart:async/stream_impl.dart:591:14)
#22 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:707:11)
#23 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:667:7)
#24 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#25 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#26 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#27 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)

最佳答案

最新的 Windows SDK 上的源映射存在问题。我相信根本原因是:https://github.com/dart-lang/sdk/issues/37364

请注意,有一个待处理的修复程序应该可以解决您的问题。

关于flutter - 运行 Flutter Web 项目时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56965471/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com