Flutter修改SDK路径 - Mac

在安装过sdk之后,如果想更换路径,
1、首先在系统目录下找到.bash_profile文件,右键选择打开方式为文本编辑,修改里面的路径之后保存,较新的 mac系统还有一个 .zshrc也修改,内容保持和.bash_profile内容文件一样就行。
或者直接在终端输入open -a TextEdit ~/.bash_profile一样能修改
在这里插入图片描述
在这里插入图片描述

2、修改android studio路径
在这里插入图片描述
如果只修改了步骤1,可能会报以下错误

Warning! The ‘flutter’ tool you are currently running is from a different Flutter repository than the one last used by this package. The repository from which the ‘flutter’ tool is currently executing will be used instead.
running Flutter tool: /Users/edz/Documents/tools/flutter/sdk/flutter
previous reference : /Users/edz/Documents/tools/flutter/sdk22/flutter
This can happen when you have multiple copies of flutter installed. Please check your system path to verify that you are running the expected version (run ‘flutter --version’ to see which flutter is on your path).

修改完记得重启 android studio,使用 flutter --version 命令查看 flutter 版本是否修改成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值