简体   繁体   中英

flutter pubspec.yaml exit code 65

My Flutter pubspec.yaml does not get the packages. This error show:

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

This is my dependencies:

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

I checked indentation, versions and so on.

What should i do?

Exit code 65 on pubspec.yaml indicates that the file is not well-formatted. You need to check the file again where is the problem or share the full yaml file so that I can check. Or try flutter clean and then flutter pub get in the terminal if you are confident about the formatting.

Try to below code and then run 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.3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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