[英]I am trying to run my flutter app and I am getting these errors?
這是錯誤信息
當前Dart SDK版本為2.13.4。
因為test >=1.16.0-nullsafety <1.16.0-nullsafety.8需要SDK版本>=2.10.0-0 <2.12.0和test >=1.16.0-nullsafety.8 <1.16.0-nullsafety.18取決於typed_data >=1.3.0-nullsafety <1.3.0,test >=1.16.0-nullsafety <1.16.0-nullsafety.18要求typed_data >=1.3.0-nullsafety <1.3.0。 又因為 test >=1.16.0-nullsafety.18 <1.16.0-nullsafety.19 依賴於 test_api 0.2.19-nullsafety.7 而 test >=1.13.0 <1.14.5 依賴於 test_api 0.2.15, test > =1.13.0 <1.14.5-∞ or >=1.16.0-nullsafety <1.16.0-nullsafety.19 requires typed_data >=1.3.0-nullsafety <1.3.0 or test_api 0.2.15 or 0.2.19-nullsafety .7. 又因為test >=1.14.5 <1.15.0 依賴於test_api 0.2.16 and test >=1.15.0 <1.15.3 依賴於test_api 0.2.17, test >=1.13.0 <1.15.3-∞ or > =1.16.0-nullsafety <1.16.0-nullsafety.19 要求 typed_data >=1.3.0-nullsafety <1.3.0 或 test_api 0.2.15 或 0.2.16 或 0.2.17 或 0.2.19-nullsafety.7。 又因為test >=1.15.3 <1.15.5依賴於test_api 0.2.18和test >=1.15.5 <1.16.0-nullsafety依賴於test_api 0.2.18+1, test >=1.13.0 <1.16.0 -nullsafety.19 需要 typed_data >=1.3.0-nullsafety <1.3.0 或 test_api 0.2.15 或 0.2.16 或 0.2.17 或 0.2.18 或 0.2.18+1 或 0.2.19-nullsafety.7。 又因為test >=1.16.0-nullsafety.19 <1.16.6 依賴於test_api 0.2.19 而test >=1.18.0 需要SDK version >=2.14.0 <3.0.0, test >=1.13.0 <1.16 .6-∞ or >=1.18.0 requires test_api 0.2.15 or 0.2.16 or 0.2.17 or 0.2.18 or 0.2.18+1 or 0.2.19-nullsafety.7 or 0.2.19 or typed_data >=1.3 .0-空安全 <1.3.0。 並且因為來自 sdk 的每個版本的 integration_test 都依賴於 test_api 0.3.0 和 typed_data 1.3.0,所以來自 sdk 的 integration_test 與 test >=1.13.0 <1.16.6-∞ or >=1.18.0 不兼容。 並且因為 test >=1.16.6 <1.18.0 取決於 shelf_static ^1.0.0 取決於 convert ^3.0.0,如果 integration_test 來自 sdk 並且 test >=1.13.0 然后轉換 ^3.0.0。 並且因為 flutter_svg 0.17.4 依賴於 xml ^3.3.1 而依賴於 convert ^2.1.0,所以來自 sdk 或 test >=1.13.0 或 flutter_svg 0.17.4 的任何一個 integration_test 之一必須為 false。 並且因為沒有版本的 flutter_svg 匹配 >0.17.4 <0.18.0 並且 test_ui 依賴於 flutter_svg ^0.17.4,來自 sdk 的 integration_test 與 test >=1.13.0 不兼容。 所以,因為test_ui同時依賴integration_test any from sdk和test ^1.13.0,所以版本解析失敗。 pub get failed (1; 因此,因為 test_ui 依賴於 integration_test any from sdk 和 test ^1.13.0,版本解析失敗。)
有人可以幫忙嗎?
這是我的 pubspec.yaml 文件
name: test_ui
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`.This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# 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.0.0"
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.4
fluttertoast: ^8.0.9
flutter_svg: ^1.0.3
dev_dependencies:
integration_test:
sdk: flutter
test: ^1.21.0
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/
- assets/images/
# 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`
你能試試這個嗎?
現在你的 dart sdk 當前版本:2.13.4
請將您的 dart 版本 2.13.4 更改為 2.10.0。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.