Skip to content

Instantly share code, notes, and snippets.

@alexjoverm
Last active March 28, 2018 15:25
Show Gist options
  • Save alexjoverm/ef82dfabfcf8342ffca30263a1cd8307 to your computer and use it in GitHub Desktop.
Save alexjoverm/ef82dfabfcf8342ffca30263a1cd8307 to your computer and use it in GitHub Desktop.
Eject React Native and run on Android

Overview for setting up the Android environment in Mac OS when ejecting a React Native app created via create-react-native-app.

Set up the environment

Prerequisites:

  • XCode command line tools are installed (via xcode-select --install for instance)
  • Brew is installed

Install the following packages

brew install ant maven gradle
brew cask install android-platform-tools android-sdk android-ndk caskroom/versions/java8

Add to your ~/.profile or ~/.zprofile:

export ANDROID_NDK_HOME="/usr/local/share/android-ndk"
export ANDROID_HOME="/usr/local/share/android-sdk"

Update SDK:

sdkmanager --update

From here you can basically follow the Running on Device steps from the React Native Docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment