Flutter sdk的颤振测试与tiled不兼容>=0.4.0. 添加火焰时:^0.24.0依赖项
我在pubspec.yaml文件中添加了flame:^0.24.0依赖项,但我不知道为什么会出现此错误: C:\flatter\flatter\flatter\bin\flatter.bat——没有彩色包装 在boxgame中运行“Flatter pub get”…Flutter sdk的颤振测试与tiled不兼容>=0.4.0. 添加火焰时:^0.24.0依赖项,flutter,Flutter,我在pubspec.yaml文件中添加了flame:^0.24.0依赖项,但我不知道为什么会出现此错误: C:\flatter\flatter\flatter\bin\flatter.bat——没有彩色包装 在boxgame中运行“Flatter pub get”… 因为sdk的每个版本的颤振测试都依赖于xml 3.5.0,而tiled>=0.4.0依赖于xml^4.2.0,所以sdk的颤振测试与tiled>=0.4.0不兼容 由于flame>=0.24.0取决于平铺^0.6.0,sdk的颤振测
因为sdk的每个版本的颤振测试都依赖于xml 3.5.0,而tiled>=0.4.0依赖于xml^4.2.0,所以sdk的颤振测试与tiled>=0.4.0不兼容 由于flame>=0.24.0取决于平铺^0.6.0,sdk的颤振测试与flame>=0.24.0不兼容 所以,因为boxgame同时依赖于flame^0.24.0和sdk中的Flatter_test any,所以版本求解失败。 pub get失败(1;因此,因为boxgame同时依赖于sdk中的flame ^0.24.0和Flatter_test any,所以版本解决失败。) 进程已完成,退出代码为1 my pubspec.yaml的代码:
name: boxgame
description: A new Flutter application.
# 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.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flame: ^0.24.0
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.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:
# - images/a_dot_burr.jpeg
# - 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
[Error][1]
[1]: https://i.stack.imgur.com/z4uaO.png
name:boxgame
描述:一个新的颤振应用。
#下面定义了应用程序的版本和内部版本号。
#版本号是由点分隔的三个数字,如1.2.43
#后跟可选的内部版本号,以+分隔。
#版本和制造商编号都可能在颤振中被覆盖
#通过分别指定--build name和--build number来生成。
#在Android中,版本名用作版本名,而版本号用作版本代码。
#更多关于Android版本控制的信息,请访问https://developer.android.com/studio/publish/versioning
#在iOS中,生成名称用作CbundleShortVersionString,而生成编号用作CbundLeverVersion。
#阅读有关iOS版本控制的更多信息,请访问
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
版本:1.0.0+1
环境:
sdk:“>=2.1.0如果不使用,可以尝试删除“颤振测试”依赖项
dev_dependencies:
flutter_test:
sdk: flutter
或者使用稍旧版本的“flame”
flame: ^0.22.1
这取决于与“颤振测试”相同的“平铺”版本。我只是添加了火焰:没有其他东西,它起作用了……不过谢谢你的回答