Search code examples
flutterfvm

However your "flutter" path current points to: in fvm


I am using Ubuntu 20.04. I installed fvm and flutter. When I installed 2 versions of Flutter SDK(stable and 1.22.0), they were installed smoothly. Then I set the stable version as global. However, it showed me this warning when I did so:

Flutter "stable" has been set as global However your "flutter" path current points to:

/snap/bin
to use global Flutter SDK through FVM you should change it to:

/home/khamidjon/fvm/default/bin

I would appreciate your help to solve this issue.enter image description here


Solution

  • A bit late to answer. I am using MacOS. In order any terminal to understand where the Flutter SDK located at, I needed to make some configurations. So, for using FVM (Flutter Version Manager) I needed to adjust them again.

    Don't worry since there are too much steps. I've just wanted to write them as clearly as possible. It is pretty simple. Here is how I've done it:

    1. Open a new terminal.

    2. Go to the upmost directory by using command: cd

    3. Type ls -la to list all the files and directories.

    4. You should see this file named exactly: .bashrc If you can't you should see another one: .zshrc

    5. Open this file using vim (it's an editor. You can research about it but for now, we keep things simple)

      So type: vim .bashrc

    6. Actually, it is a built-in editor. It works a bit differently. You need some basic commands.

    7. Press i key to change into INSERT mode of vim editor.

    8. Now, you can type or delete text. You should make the corresponding changes. So make sure this line exist. (You can comment out other lines that by #).

      I had the Flutter SDK like that before:

        export PATH=$PATH:"/Users/your-username-here/another-folder-maybe/flutter/bin"
    

    So I commented that line out and inserted this:

    export PATH=$PATH:"/Users/your-username-here/fvm/default/bin"
    
    1. Now, you should quit the INSERT mode. For that, I use "Control + C" keybinding on Mac. It might be different for you, check that out on the internet.

    2. Then, let's save the changes and quit vim editor by typing exactly

    :wq

    1. Now you are all set. Important, you have to restart the terminal. Try the fvm command again and you should be able to set the global version without an error.