- Install brew, run the command line
https://brew.sh/
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install nodejs and npm
nodejs installation package address
npm installation package address
- Modify the npm mirror address to point to the domestic mirror
// 淘宝npm镜像地址
https://npm.taobao.org/
// 也可以使用定制的 cnpm (gzip 压缩支持) 命令行工具代替默认的 npm:
npm install -g cnpm --registry=https://registry.npm.taobao.org
- Install ionic and cordova
Install ionic command line
npm install -g ionic
Install cordova command line
npm install -g cordova
- Install XCode
Please go to AppStore to download and install.
- Configure Android SDK
Install Android Studio and install the SDK configuration to ~/Library/Android/sdk
After creating the project, you need to perform the following steps
- Add the Andorid platform, run the following command line to add
ionic cordova platform add android
- To detect the problem, run the following command line to detect whether there is a problem
cordova build android --verbose