Overview for setting up the Android environment in Mac OS when ejecting a React Native app created via create-react-native-app
.
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.