繁体   English   中英

我正在尝试运行我的 flutter 应用程序,但出现这些错误?

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM