I am a test-driven developer who avoids fancy IDEs. I attempted to work through the details of a headless Android-React Native development environment, but quickly realized I was in over my head. This document outlines what may be the more typical workspace arrangement. It also demonstrates how I got everything working with Detox.
The following steps were executed on an Ubuntu 18.04 Desktop machine. What follows is heavily adapted from the Facebook and Detox.
You need node 8.3 or newer. I’m using 10.15.3.
React Native CLI
npm install -g react-native-cli
This is the version recommended by Facebook. Installation instructions are adapted from those provided by DigitalOcean.
sudo apt install openjdk-8-jdk
You can download the IDE here. I simply installed via the Ubuntu Software manager.
On first execution, select Do not import settings and press OK. There are some Setup Wizard screens, which you can navigate. When given the opportunity, choose a Custom setup when prompted to select an installation type. Check the following boxes:
Android SDK Platform
Android Virtual Device
Click Next to install all of these components.
A React Native app requires the Android 9 (Pie) SDK. Install it throught the SDK Manager in Android Studio. Expand the Pie selection by clicking the Show Package Details box. Make sure the follow options are checked:
Android SDK Platform 28
Intel x86 Atom_64 System Image or Google APIs Intel x86 Atom System Image (I chose the first option)
Add the following lines to your $HOME/.bashrc config file: