首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >然而,您的“颤动”路径当前指向:在fvm中

然而,您的“颤动”路径当前指向:在fvm中
EN

Stack Overflow用户
提问于 2021-06-02 21:44:18
回答 1查看 315关注 0票数 1

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

Flutter“稳定”已设置为全局,但您的"flutter“路径当前指向:

代码语言:javascript
复制
/snap/bin
to use global Flutter SDK through FVM you should change it to:

/home/khamidjon/fvm/default/bin

如果您能帮助我解决这个问题,我将不胜感激。

EN

回答 1

Stack Overflow用户

发布于 2021-10-14 09:44:54

现在回答有点晚了。我正在使用MacOS。为了让任何终端都能理解Flutter SDK的位置,我需要做一些配置。因此,为了使用FVM (Flutter Version Manager),我需要再次调整它们。

步骤太多了,不用担心。我只是想把它们写得尽可能清楚。这很简单。下面是我是如何做到的:

代码语言:javascript
复制
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.
票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67806355

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档