Mac 开发环境 React Native0.60 环境 安卓环境 Java 变量 及~/.zshrc 文件配置
安装HomeBrew.
https://brew.sh/index_zh-cn.html
安装不成功:
curl: (60) SSL: no alternative certificate subject name matches target host name 'raw.githubusercontent.com'
More details here: https://curl.haxx.se/docs/sslcerts.html
修改Hosts试试
sudo vi /etc/hosts
增加: 192.30.253.113 raw.githubusercontent.com
esc然后:wq保存退出
再次安装,提示
==> Downloading and installing Homebrew...
fatal: bad numeric config value 'false5' for 'http.sslverify': invalid unit
Failed during: git fetch origin --force
Warning: /usr/local/bin is not in your PATH.
此时需要修改环境变量:
vi ~/.bash_profile
添加:export PATH=/usr/local/bin:$PATH
source ~/.bash_profile #更新配置后的环境变量
再次安装,然后执行brew help, 提示正常,安装成功
brew install node
brew install watchman
npm config set registry https://registry.npm.taobao.org --globaln
pm config set disturl https://npm.taobao.org/dist --global
yarn config set registry https://registry.npm.taobao.org --global
yarn config set disturl https://npm.taobao.org/dist --global
javac -version
来查看你当前安装的 JDK 版本。如果版本不合要求,则可以到 官网上下载。
配置安卓环境变量
vi ~/.bash_profile 或者 vi ~/.zshrc
iOS 需要安装Xcode 和 brew install cocoapods
评论