React Native Without Android StudioDevelopment ·
I love using a minimal setup as much as possible. One of the perks of react native development is that you arent forced to use the standard IDE’s; Xcode for IOS and Android Studio for Android. I prefer to use my standard web development tools (vim, tmux, chrome). Working on OS X, I wanted to see what it would take to get an android emulator up and running without having to install Android Studio. Turns out its not that difficult. Following are the steps I used.
Download the cli tools from here
This will give you a zip file which on expansion gives the ‘tools’ folder. The first tool we will use is:
sdkmanagerwe can install the version of android react-native supports, android-23:
- Install a system image, in my case I use the x86 (vs the arm):
- Once this is done and the image is downloaded we can use the
avdmanagertool to create the avd (Android Virtual Device):
./tools/bin/avdmanager create avd -n react -k "system-images;android-23;google_apis;x86"
this will create a emulator named ‘react’
- Reacti-Native also requires build-tools v23.0.1. These can be installed using the sdkmanager as well:
Since we installed the x86 (vs arm) image. We need the intel HAXM (Hardware Accelerated Execution Manager) tool installed as well. This hypervisor engine gives the x86 system image the performance we need. This can be downloaded from here
Finally start the emulator:
Tell react native where your android sdk is installed:
export ANDROID_HOME=<Path wher you unzipped the cli tools>
You can now cd over to your react-native project and by running the
command will deploy to the newly running emulator.
Aslo note that the extremely useful and important
adb tool will be located in the
Happy React Native/Android Hacking!
Please Leave Comments below.