Flutter always running pub upgrade every time i cold start(as well as git error showning in cmd and run window)

1,046

You are getting the git error because you don't have Git installed in your Windows OS.

To install Git, go to this link and download Git on your system.

For the Flutter Warning, you need to add the Flutter Plugin in your Android Studio(AS).

To install the Plugin these:

  1. Open Android Studio.
  2. Go to File -> Settings -> Search for Plugins
  3. Search for the Flutter plugin and click Install.
  4. Click Yes when prompted to install the Dart plugin, it is necessary to use Flutter.
  5. Click Restart when prompted.

You seem to be starting Flutter so I advice you to read the Flutter Documentation. Every step is clearly defined there.

Share:
1,046
Andrii Kaidash
Author by

Andrii Kaidash

Updated on December 27, 2022

Comments

  • Andrii Kaidash
    Andrii Kaidash 11 months

    As stated in the title, flutter runs pub upgrade every time i cold start an app. It takes a long time every time it does that, and as far as im concerned, it shouldn't do that in the first place. I see this every time i start an app

    'git' is not recognized as an internal or external command,
    operable program or batch file.
    Building flutter tool...
    Running pub upgrade... 
    

    Git error message is something that pops up every time as well. I had problems installing git at the start and i had this exact same error message too. But it does the same in cmd too, no matter what command i use. If anyone knows how to fix this, i would greatly appreciate the help. Here is what i get when running flutter doctor -v in cmd:

    operable program or batch file.
    Building flutter tool...
    Running pub upgrade...
    [√] Flutter (Channel stable, 1.22.6, on Microsoft Windows [Version 10.0.18363.1316], locale en-US)
        • Flutter version 1.22.6 at C:\src\flutter
        • Framework revision 9b2d32b605 (8 days ago), 2021-01-22 14:36:39 -0800
        • Engine revision 2f0af37152
        • Dart version 2.10.5
    
    
    [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at C:\Users\Admin\AppData\Local\Android\sdk
        • Platform android-30, build-tools 30.0.3
        • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
        • All Android licenses accepted.
    
    [!] Android Studio (version 4.1.0)
        • Android Studio at C:\Program Files\Android\Android Studio
        X Flutter plugin not installed; this adds Flutter specific functionality.
        X Dart plugin not installed; this adds Dart specific functionality.
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    
    [√] Connected device (1 available)
        • M2007J20CG (mobile) • 3dc8c919 • android-arm64 • Android 10 (API 29)
    
    ! Doctor found issues in 1 category.
    
    • Aashar Wahla
      Aashar Wahla almost 3 years
      I will recommend you to check if you have properly installed flutter and dart library in visual studio code.
    • Aidan Connelly
      Aidan Connelly over 1 year
      Also having this issue Mar 22, also on windows.
  • Andrii Kaidash
    Andrii Kaidash almost 3 years
    I have already installed git, and i have flutter currently installed, otherwise i wouldn't be able to run my apps without it(i reinstalled it only an hour ago, and it doesnt solve my problem)
  • Eric Aya
    Eric Aya over 2 years
    First line of the existing ansswer: You are getting the git error because you don't have Git installed
  • Admin
    Admin over 2 years
    yes, it is, but just install git only not solve the problem, you must add it path to system variable, so the terminal/command line can recognize 'git' command