I installed flutter and set it to path, but when I tried to run any flutter command fx "flutter doctor" nothing happens.
https://i.imgur.com/UErgyT5.png
What do I do from here?
I've uninstalled and reinstalled flutter, but it still does not work.
open windows terminal as an administrator....then run flutter it will install missing files if any then run flutter doctor to see if anything else is missing.....incase the command is not recognised please add the path to system variables
Related
I have a repeated terminal problem.
If i turn on the terminal and run the flutter doctor, it says command not found and it does not work.
So if i type [export PATH="$PATH:pwd/flutter/bin"] and enter the flutter doctor, it is worked
In addition, the flutter doctor was executed like this, but the version of cocoapods was low, causing continuous errors.
and then, i typeed [source ~/.zshrc] and [sudo gem install cocoapods]
I entered these and they work normally.
But I wonder if I have to go through these procedures every time I turn on the terminal.
I don't think this problem is a problem for me to run the flutter in vscode.
Can't I save the procedure I enter so that I don't find any errors when I run the flutter doctor right from the terminal?
If I can't do that, is there no problem using flutter in vscode even if I keep the current situation?
thank u
type [export PATH="$PATH:pwd/flutter/bin"]
type [source ~/.zshrc] and [sudo gem install cocoapods]
Try to do this:
Type: open ~/.zshrc
Edit inside your zshrc: PATH="$PATH:$HOME/development/flutter/bin". Well in my case, the flutter folder is in $HOME/development, replace this in your corresponding path.
Delete all of redundant other flutter/bin in zshrc.
Close your text edit & run source ~/.zshrc.
Exit your current terminal. If you are in vscode, close your terminal & exit vscode also.
My problem was that I didn't create a development folder at home. Creating and re-downloading the development folder resolved most issues.
I have a small question.
When we debug app if we press r app reloads or R hot restart.
But how to run get flutter packages.
I cannot write the whole line flutter pug get it goes to new line in command prompt.
you can use another terminal/command prompt go to project directory to run flutter pub get.
but if you use VsCode it is very easy to run and debug the project
you can also use the terminal to run flutter pub get in it
VsCode provide run menu that really helps to run the project and when you save changes in pubspec.yaml it automatically get packages.
but make sure that you have install flutter and dart plugins in VsCode
I have been working with flutter for a week now and it runs okay, however I can't use commands such as flutter doctor or flutter upgrade on my terminal nor Android studio. Whenever I try to run a flutter command I get
zsh: permission denied: /Users/name/flutter/bin.
I tried adding the source to nano ~/.zshrc and export PATH, but nothing worked.
I faced this issue when setting up Flutter on my new mac, even after setting the PATH correctly. Turns out i installed the wrong SDK (Window). So make sure to install the correct Flutter SDK on your respective OS.
For MacOS :
https://flutter.dev/docs/development/tools/sdk/releases?tab=macos
For Window :
https://flutter.dev/docs/development/tools/sdk/releases?tab=windows
Make sure you've installed the correct SDK for your machine. For me I had installed Flutter's Windows SDK on my Mac machine.
For macOS : https://flutter.dev/docs/development/tools/sdk/releases?tab=macos
For Window: https://flutter.dev/docs/development/tools/sdk/releases?tab=windows
If you added the path and sure that you have downloaded the correct os files and still get the error:
Go to flutter folder
Empty folder
Open terminal and go to the flutter folder
git clone https://github.com/flutter/flutter.git -b stable
Run below command in the terminal, it worked for me
export PATH="/<full-path-of-flutter-folder>/bin:$PATH"
add the sudo prefix to your command. I guess you are not the admin.
eg: sudo flutter doctor
I have a serious issue trying to install flutter... The pub upgrade when you run flutter doctor have being running for the past one hour on my system... I have being stuck with this issue since yesterday i don't know what the exact problem is... I have tried installing via Android Studio and through command line... It ends up getting stuck at "Running Pub Upgrade"...
Here are a few things you can try,
Close Android studio,
Open Task Manager and see if any Dart/Flutter services are running, if yes then close them.
Clear cache from flutter/bin folder.
and now run again.
I was a able to solve this problem, by downloading the flutter zip file in the flutter website, adding flutter/bin directory to my environment variables Path, restarting my system and running flutter doctor...
I also encountered the same problem, but I solved it using another computer,
what I did was;
I cleared my cache folder in flutter/bin folder
then I copied the folder containing flutter SDK into another computer *C:* drive so the folder was like C:\src\flutter on the other computer(which was windows also), opened the folder, opened flutter console, and run flutter doctor. it worked fine on that computer, everything was in place, so I copied that same folder again back into my computer, replacing all exiting files and run flutter doctor on my computer and it worked for me.
I also had this problem. It was stuck on "Running pub upgrade..." for more than 24 hours.
On this GitHub thread someone solved it by turning Anti-virus shields off. [https://github.com/flutter/flutter/issues/61719][1] (Stuck at Running pub upgrade)
This solved the issue for me. I closed Windows PowerShell, and turned off Avast Anti-virus shields. I re-opened Windows PowerShell, ran flutter doctor and all went through perfectly with no issues.
I have downloaded and installed flutter under Windows. After that, I am unable to issue any flutter commands on the Windows command prompt.
Here are the things I have checked/tried so far:
made sure to install Flutter in a directory where my user has write access
made sure that the bin directory is added to the path
uninstalled and reinstalled flutter two or three times
Do you have any idea what else can be the problem?