prasann patil
prasann patil

Reputation: 1

flutter is not recognised even after setting environment variables

When I do "flutter doctor" on cmd this is the error I receive:
where' is not recognized as an internal or external command operable program or batch file unable to locate git
Note that git --version gives me git version 2.28.0.windows.1

These are the things I tried
1.Reinstalling git
2.Updating Powershell to 5.0 as I run windows 7 SP1 and flutter requires Powershell 5.0 and greater
3.Tries resetting path variables
Here are my path variables.

USER ENV VAR:    
C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\DELL\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\DELL\AppData\Roaming\npm;C:\src\flutter\bin  
  
SYSTEM ENV VAR:  
C:\Program Files\Java\jdk-14\bin;%PYTHON_HOME%  ; C:\Users\DELL\AppData\Local\Programs\Python\Python37;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Git\bin\git.exe;C:\Windows\System32 ;%systemroot%\System32\WindowsPowerShell\v1.0\

I am not able to find where exactly I am going wrong.
I am new to this.Any help would be appreciated.I have been trying this from 3 days nothing helps.

UPDATE ADDING FLUTTER PATH TO SYSTEM VARIABLE WORKED FOR ME . Though now I have another set of issues as you can see in the image.I have android studio installed ; Have installed the dart and flutter plugin.Still I am getting the error

Upvotes: 0

Views: 6521

Answers (2)

RegularGuy
RegularGuy

Reputation: 3676

Comparing with my enviroment variables it seems like you don't have java jdk installed, otherwise i see no problem . However i will share my variables . Another way of finding what is wrong is opening cmd in the flutter folder and lanuching flutter_console.bat inside the cmd, that way it will not close and it will show the error if there is any

USER ENV:
C:\Users\USER\AppData\Local\Microsoft\WindowsApps;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Users\USER\AppData\Local\Programs\Microsoft VS Code\bin;D:\flutter\bin;C:\Users\USER\.gradle\wrapper\dists\gradle-6.1.1-all\cfmwm155h49vnt3hynmlrsdst\gradle-6.1.1\bin;C:\Program Files\Java\jdk1.8.0_261\bin;C:\Users\USER\AppData\Local\Android\Sdk\tools\bin;

SYSTEM ENV:
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Git\cmd

Upvotes: 0

Houssem
Houssem

Reputation: 7578

Make sure this path of flutter %/flutter/bin exists in the environment variable and you have restarted the terminal (maybe the system also). enter image description here

Update :

Can You run flutter doctor -v using flutter_console and show us the error message:enter image description here

Upvotes: 3

Related Questions