由于不支持的依赖项导致 Flutter Web 失败

时间:2021-04-06 17:24:44

标签: flutter dart dependencies flutter-web

我正在尝试为 Flutter 构建 Web 开发。

依赖关系阻止我创建应用程序。

我如何创造条件来启用应用程序的 Web 开发?

webdev could not run for this project.
The `build_web_compilers` version – 1.2.3 – is not within the allowed constraint – >=2.6.1 <3.0.0.
You have a dependency on `cloud_firestore` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `cupertino_icons` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `firebase_auth` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `firebase_core` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `flutter` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `flutter_test` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `image_picker` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `path_provider` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `shared_preferences` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `url_launcher` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
pub finished with exit code 78

User@DESKTOP-9470-17 MINGW64 ~/Desktop/Coding Updated/Single Admin/Version Feb 21/grocery_store_admin
/flutter.dev/web for more details.
You have a dependency on `flutter_test` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `image_picker` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `path_provider` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `shared_preferences` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.
You have a dependency on `url_launcher` which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.```

1 个答案:

答案 0 :(得分:-1)

如您所见https://flutter.dev/docs/get-started/web

尝试运行:

$ flutter channel stable
$ flutter upgrade

但要小心运行 flutter channel stable 会用稳定版本替换您当前的 Flutter 版本,如果您的连接速度很慢,可能需要一些时间。在此之后,运行 flutter upgrade 会将您的安装升级到最新的稳定版。返回到另一个频道(测试版、开发版或主版)需要显式调用 flutter 频道。