Start and create a React Native app on your device

What is React Native?

Two ways to develop a React Native app

Using Expo CLI — Fast & Easy

➜  npm -v
➜ node -v
expo init YourProjectName 
(( select a blank template ))
cd YourProjectNamenpm start

Using React Native CLI

➜  npm -v
➜ node -v
brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
export ANDROID_HOME=$HOME/Library/Android/sdkexport PATH=$PATH:$ANDROID_HOME/toolsexport PATH=$PATH:$ANDROID_HOME/tools/binexport PATH=$PATH:$ANDROID_HOME/platform-tools
npm install -g react-native-cli
react-native init YourProjectName
adb devices
➜  ~ adb devices
List of devices attached
4T89626CC176362736 device
react-native run-android

Common Errors

Error: Command failed: ./gradlew app:installDebug
sudo react-native run-android
ava.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
repositories {google() <= this line should already existmaven { url "" } <= add this linejcenter() <= should exist}
SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable
sdk.dir = /Users/USERNAME/Library/Android/sdk




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store