我已经克隆了https://github.com/flutter/flutter_web存储库,我正在尝试在示例目录中运行 hello_world 程序。
我已经完成了 GitHub 页面中指示的所有内容。此外,我使用 apt 安装了 dart SDK,因为我遇到了另一个错误,“webdev dart:未找到”,这已修复。
现在运行“webdev serve”时出现以下错误,“自生成 pubspec.lock 文件以来,pubspec.yaml 文件已更改,请再次运行“pub get”。”
我跑了“flutter pub get”和“flutter pub upgrade”,这并没有解决它。
我希望这会在端口 8080 上启动一个 Web 服务器。
flutter pub get -v
是
[ +18 ms] executing: [/home/meth/Documents/development/flutter/] git log -n 1 --pretty=format:%H
[ +21 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ ] 7a4c33425ddd78c54aba07d86f3f9a4a0051769b
[ ] executing: [/home/meth/Documents/development/flutter/] git describe --match v*.*.* --first-parent --long --tags
[ +7 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[ ] v1.5.4-hotfix.2-0-g7a4c33425
[ +8 ms] executing: [/home/meth/Documents/development/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +5 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/stable
[ ] executing: [/home/meth/Documents/development/flutter/] git ls-remote --get-url origin
[ +7 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +36 ms] executing: [/home/meth/Documents/development/flutter/] git rev-parse --abbrev-ref HEAD
[ +8 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] stable
[ +21 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FuchsiaCacheArtifacts' is not required, skipping update.
[ +16 ms] Running "flutter packages get" in hello_world...
[ +3 ms] Using /home/meth/Documents/development/flutter/.pub-cache for the pub cache.
[ +1 ms] executing: [/home/meth/Documents/work/flutter_web/examples/hello_world/] /home/meth/Documents/development/flutter/bin/cache/dart-sdk/bin/pub --verbosity=warning --verbose get
--no-precompile
[ +440 ms] ! flutter_web 0.0.0 from path ../../packages/flutter_web
[ +1 ms] ! flutter_web_ui 0.0.0 from path ../../packages/flutter_web_ui
[ +49 ms] Running "flutter packages get" in hello_world... (completed in 0.5s)
[ +166 ms] "flutter get" took 717ms.
[ ] "flutter get" took 717ms.
和输出
webdev serve -v
是
webdev could not run for this project.
The pubspec.yaml file has changed since the pubspec.lock file was generated, please run "pub get" again.
我的当前目录
drwxrwxr-x 3 meth meth 4096 Jun 9 07:38 android
drwxrwxr-x 4 meth meth 4096 Jun 9 07:38 ios
drwxrwxr-x 2 meth meth 4096 Jun 9 07:41 lib
-rw-rw-r-- 1 meth meth 10592 Jun 9 12:00 pubspec.lock
-rw-rw-r-- 1 meth meth 400 Jun 9 07:55 pubspec.yaml
drwxrwxr-x 2 meth meth 4096 Jun 9 07:40 web