我正在学习和练习 Flutter 的基础知识,但遇到了这个问题。
代码:
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2+
english_words: ^3.1.0
执行命令 --no-color packages get
后出现错误:
Error on line 21, column 20 of pubspec.yaml: Invalid version constraint: Cannot include other constraints with "^" constraint in "^0.1.2+".
cupertino_icons: ^0.1.2+
^^^^^^^
pub get failed (65)
开发平台: 在 Mac OS Mojave 上运行的 Android Studio 3.4
最佳答案
经过网络搜索,我最终来到这里,我犯的错误是添加了一个尾随逗号
改变了这个
flutter_audio_recorder: ^0.5.5,
到
flutter_audio_recorder: ^0.5.5
关于dart - 无效的版本约束 : Cannot include other constraints with "^",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55772290/