Flutter: pub get failed

前端 未结 4 1595
旧时难觅i
旧时难觅i 2021-01-17 23:20

Flutter project showing me a warning \'Packages get\' has not been run with suggested solutions,

  • Get Dependencies
  • Upgrade Dependencies
相关标签:
4条回答
  • 2021-01-17 23:52

    People who you are from Windows OS and still cannot solve pub get failed (1; no message) exit code 1 problem, you can try the below steps:

    1. Open Start -> Run -> regedit
    2. Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\Autorun (If it doesn't exist, create a String value)
    3. Change the value to @chcp 65001>nul
    4. Run flutter upgrade --force
    5. Run flutter pub get in your flutter project folder

    If it's not showing pub get failed anymore, then you can run your app in your app emulator or physical device.

    Note: This may take some time to run your app.

    Last but not least, pub get failed was a horrible error for me!

    Solution collected from here

    0 讨论(0)
  • 2021-01-17 23:59

    Replace inside your devDependencies

    test: 0.12.30+4 # TRANSITIVE DEPENDENCY with test: 0.12.30+3

    Or you can potentially switch to master branch on flutter. Because you most likely clone an example of a project based on flutter's master

    0 讨论(0)
  • 2021-01-18 00:04

    Click on the Link get packages in the given environment like VS code or save your code while pubspec.yaml file is opened will get flutter packages for you automatically.

    0 讨论(0)
  • 2021-01-18 00:14

    For Flutter projects run

    flutter packages get
    

    Instead of

    pub get packages
    
    0 讨论(0)
提交回复
热议问题