现在的位置: 首页 > 综合 > 正文

MAC 上找不到.bash_profile该怎么办?

2013年10月01日 ⁄ 综合 ⁄ 共 402字 ⁄ 字号 评论关闭

 

开发Android的环境要重新在Mac上搭建,结果在配置环境变量时找不到.bash_profile文件。查过很多资料解决方案都很笼统,结果还是在英文网站上找到解决方法。

1. 启动终端Terminal

2. 进入当前用户的home目录

    输入cd ~

3. 创建.bash_profile

    输入touch .bash_profile

4. 编辑.bash_profile文件

    输入open -e .bash_profile

    因为是为了搭建Android开发环境,输入Android SDK下的tools目录:export PATH=${PATH}:/eclipse/android_sdk/tools

5. 保存文件,关闭.bash_profile

6. 更新刚配置的环境变量

    输入source .bash_profile

7. 验证配置是否成功

    输入android启动Android SDK and AVD Manager

 

 

 

抱歉!评论已关闭.