dart Flutter- logistics需要SDK版本>=2.12.0 < 3.2.2,版本解析失败,退出代码1

f2uvfpb9  于 5个月前  发布在  Flutter
关注(0)|答案(1)|浏览(72)

我正在开发一个Flutter物流应用程序,它基本上可以跟踪产品。但是,我的pubspec.yaml文件中存在一个问题
pubspec.yaml里面的代码

name: logistics
description: A new Flutter project.

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
  sdk: '>=2.12.0 <3.2.2' 

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.6
  shared_preferences: ^2.2.2
  scoped_model: ^2.0.0
  # map_view: ^0.0.14
  rxdart: ^0.27.7
  http: ^1.1.2
  intl: ^0.18.1
  mapbox_gl: ^0.16.0
  syncfusion_flutter_maps: ^18.2.44-beta
  google_maps_flutter: ^2.2.5
  google_maps_flutter_web: ^0.5.4+2

  

dev_dependencies:
  flutter_test:
    sdk: flutter

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:
  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/images/logo.png
  #  - images/a_dot_ham.jpeg
  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.
  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages
  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

字符串
错误:[smartailogistics] flutter pub get --no-example正在解析依赖项.当前Dart SDK版本为3.2.2。
由于物流需要SDK版本>=2.12.0 <3.2.2,版本解析失败,退出代码1
我尝试重置Flutter的SDK版本,但它不起作用.
我尝试将Flutter的SDK版本重置为2.12.0和Scoped Model
我也做了flutter upgrade,但仍然显示相同的错误
我想不通,到底是怎么了

wi3ka0sx

wi3ka0sx1#

以下内容表示dart SDK应低于3.2.2。

environment:
  sdk: '>=2.12.0 <3.2.2'

字符串
将最大限制更改为4. 0. 0应该可以修复它。2你也可以考虑将最小限制更改为3. 0. 0。

environment:
  sdk: '>=2.12.0 <4.0.0'

相关问题