"zsh: command not found: fvm" When I open my Flutter project in Android Studio
1,671
The problem is resolved since I used this code in Terminal outside of Android Studio:
brew tap leoafarias/fvm
brew install fvm
Author by
Erland Van Reet
Updated on December 30, 2022Comments
-
Erland Van Reet over 1 year
I've added these to my .zshrc file
export PATH="$PATH:`pwd`/.pub-cache/bin" export PATH="$PATH:`pwd`/fvm/default/bin" export PATH="$PATH:`pwd`/bin/cache/dart-sdk/bin"
Flutter and fvm seem to work fine when I work in Terminal. But once I create a new project and I use the terminal in Android Studio, I cant find the commands.
➜ flutter_fvm_stable echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Users/{Username}/flutter_fvm_stable/.pub-cache/bin:/Users/{Username}/flutter_fvm_stable/fvm/default/bin:/Users/{Username}/flutter_fvm_stable/bin/cache/dart-sdk/bin ➜ flutter_fvm_stable fvm doctor zsh: command not found: fvm
I managed to fix this issue for the flutter command:
➜ flutter_fvm_stable exexport PATH="/Users/{Username}/flutter/bin:$PATH" ➜ flutter_fvm_stable flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.2.1, on macOS 11.4 20F71 darwin-x64, locale en-BE) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) [✓] Xcode - develop for iOS and macOS ...
But when I try it with the fvm path, I still get nothing..
➜ flutter_fvm_stable exexport PATH="/Users/{Username}/fvm/default/bin:$PATH" ➜ flutter_fvm_stable fvm doctor zsh: command not found: fvm
I've tried running
export PATH="$PATH":"$HOME/.pub-cache/bin"
But then I get
Warning: Pub installs executables into $HOME/.pub-cache/bin, which is not on your path. You can fix that by adding this to your shell's config file (.bashrc, .bash_profile, etc.): export PATH="$PATH":"$HOME/.pub-cache/bin"
While I already have this line in my .zshrc file
export PATH="$PATH:`pwd`/.pub-cache/bin"
Thank you so much for trying to help me out!