我的Flutter pubspec.yaml没有收到这些包。此错误显示:
Error on line 30, column 22 of pubspec.yaml: Invalid version constraint: Expected version number after "^" in "^^4.2.1", got "^4.2.1".
╷
30 │ animated_text_kit: ^^4.2.1
│ ^^^^^^^
╵
pub get failed (65; ╵)
exit code 65这是我的依赖项:
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
animated_text_kit: ^4.2.1
cupertino_icons: ^1.0.3
audioplayers: ^0.16.1
dev_dependencies:
flutter_test:
sdk: flutter我检查了缩进,版本等等。
我该怎么办?
发布于 2021-07-30 08:16:27
pubspec.yaml上的退出代码65表示该文件的格式不正确。您需要再次检查文件,问题出在哪里,或者共享完整的yaml文件,以便我可以检查。或者,如果您对格式很有信心,可以尝试在终端中使用flutter clean,然后使用flutter pub get。
发布于 2021-07-30 08:19:36
尝试下面的代码,然后运行flutter pub get refer documentation here
dependencies:
flutter:
sdk: flutter
audioplayers: ^0.16.1
animated_text_kit: ^4.2.1
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.3https://stackoverflow.com/questions/68587459
复制相似问题