基本環境を構築する
- install nvm
- https://github.com/creationix/nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
vi ~/.bash_profile
nvm --version
- install node and npm
- https://nodejs.org/ja
nvm ls-remote
nvm install v10.9.0
$ node -v
v10.9.0
$ npm -v
6.2.0
- install ionic & cordavo
npm i -g ionic cordova
$ ionic --version
4.1.1
$ cordova --version
8.0.0
Android SDKの環境変数を設定
export ANDROID_HOME=~/Library/Android/sdk
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
export PATH=$PATH:~/Library/Android/sdk/platform-tools:~/Library/Android/sdk/tools
export PATH=$PATH:"/Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/"
プロジェクトを作成
$ ionic start hello_world blank
Androidアプリを作成
$ ionic cordova run android