【问题标题】:However your "flutter" path current points to: in fvm但是,您的“颤动”路径当前指向:在 fvm
【发布时间】:2021-06-02 13:44:18
【问题描述】:

我使用的是 Ubuntu 20.04。我安装了 fvm 和颤振。当我安装了 2 个版本的 Flutter SDK(稳定版和 1.22.0)时,它们都安装得很顺利。然后我将稳定版本设置为全局。但是,当我这样做时,它向我显示了这个警告:

Flutter "stable" 已设置为全局 但是,您的“颤动”路径当前指向:

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

/home/khamidjon/fvm/default/bin

感谢您帮助解决这个问题。

【问题讨论】:

标签: flutter


【解决方案1】:

回答有点晚了。我正在使用 MacOS。为了让任何终端都能了解 Flutter SDK 的位置,我需要进行一些配置。所以,为了使用 FVM(Flutter 版本管理器),我需要再次调整它们。

不用担心,因为步骤太多。我只是想尽可能清楚地写出来。这很简单。这是我的做法:


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"

9. 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.

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

11. 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.


【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-02-04
    • 1970-01-01
    • 1970-01-01
    • 2011-11-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多