like a baws
ps: MacosX only sorry linux fans.
As of writing this in september 2015 react native requires installing nodejs 4.0.+
I like ndenv so let’s use that.
Open a terminal and issue the following commands (I’m assuming you have home-brew and some form of git installed here)
Let's remove node from homebrew if you have that
$ brew remove node
$ brew prune node
Let's install ndenv
$ git clone https://github.com/riywo/ndenv ~/.ndenv
$ git clone https://github.com/riywo/node-build.git ~/.ndenv/plugins/node-build
$ echo 'export PATH="$HOME/.ndenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(ndenv init -)"' >> ~/.bash_profile
$ exec $SHELL -l
Then install node
$ ndenv install v4.0.0 # react-native uses 4.0.0 specifically sorry.
$ ndenv global v4.0.0
$ ndenv rehash
From the console run. I’m HEADing watchman since homebrews default (older) version 3.7.7 (as of this writing) messes up react-native in a horrible way
$ brew update
$ brew install --HEAD watchman
$ brew install flow
Visit the app store on your machine to install xcode, open it 1 time to accept the terms and conditions
with all dependencies running it’s time to install react native
$ npm install -g react-native-cli
Run the following command to install the sdk (software development kit)
$ brew install android-sdk
$ echo 'export ANDROID_HOME=/usr/local/opt/android-sdk' >> ~/.bash_profile
Open a new terminal screen and run (don't close your terminal screen after opening)
$ android
In the window that loads select the following items:
- Android SDK Build-tools version 23.0.1
- Android 6.0 (API 23) (everything in api 32)
- API 22 --> Intel x86 Atom System Image (for Android 5.1.1 - API 22)
- Extras --> Android Support Repository
- Extras --> Android Support Library
- Extras --> Intel x86 Emulator Accelerator (HAXM installer)
In some cases you need to alter HAXM stuff just run this (you might not need it, do this if stuff fails later!
$ open /usr/local/opt/android-sdk/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.dmg
if you plan on using a virtual device instead of a hardware connected to your machine Open a console and run (don't close the terminal after executing the command):
$ android avd
Create a new avd and match with the config below:
Thanks for reading, see you at the course!