我可以就这个错误向您寻求帮助吗
当我第一次尝试使用 flutter run -d chrome 运行我的 flutter web 时会发生这种情况
Launching lib\main.dart on Chrome in debug mode...
Syncing files to device Chrome...
25,220ms (!)
GET /dwds/src/injected/client.js
Error thrown by handler.
FileSystemException: Cannot open file, path = 'C:\Users\Acer\flutter\.pub-cache\hosted\pub.dartlang.org\dwds-2.0.1\lib\src\injected\client.js' (OS Error: The system cannot find the path specified.
, errno = 3)
dart:isolate _RawReceivePortImpl._handleMessage
如果我尝试使用
flutter run -d web
它没有抛出任何错误,但在网站上它变成空白白色没有显示任何内容。
无论如何感谢您的帮助
最佳答案
在 pubspec.yaml 中添加以下内容对我有用。我正在使用测试版 channel 。
dependencies:
dwds: ^7.1.1
然后运行命令:flutter update-packages
关于Flutter Web 因无法打开文件 client.js 而崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60768325/