The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Setup React Native for iOS and Android

Setup React Native for iOS and Android

4:48
In this lesson we'll walk through the process of installing the react-native-cli through setting up a basic react-native project on iOS. We'll get the basic project running in a simulator via XCode. We'll also setup Android, Android Studio and get the project running on an emulator with the react-native run-android command.
Watch this lesson now
Avatar
egghead.io

In this lesson we'll walk through the process of installing the react-native-cli through setting up a basic react-native project on iOS. We'll get the basic project running in a simulator via XCode. We'll also setup Android, Android Studio and get the project running on an emulator with the react-native run-android command.

Avatar
Adrian

This guide is great, however the one item I was missing was the paths created to run the android command in the terminal, which requires a ~/.bash_profile export setup (can be found here: https://facebook.github.io/react-native/docs/getting-started.html)

In reply to egghead.io
Avatar
Jason Brown

Thank you for posting this, I believe I installed mine originally via homebrew which automatically added it. Apologies for missing the step. When I get around to it I will re-record this and add in the missing step.

For those that read this the missing step is 4. Set up the ANDROID_HOME environment variable

Which requires you to put in your ~/.bash_profile , ~/.bashrc or rc of which ever terminal you use.

export ANDROID_HOME=${HOME}/Library/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
In reply to Adrian
Avatar
Jon

I'm still having trouble getting this to work; I'm not that familiar with adding PATHs, but I've followed the steps for #4 on the Getting Started page, and I've also tried manually creating the ~/.bash_profile file, but I'm still getting the android:command not found error. Any tips?

In reply to Jason Brown
Avatar
Andres

It'd be super nice to have the transcript of this course too. Cheers!!

Avatar
IainW

This needs to be revised as the android command has been deprecated and Android Studio configuration has change with the latest release.

Avatar
Mário

Plus one.
I had to create a project in Android Studio to that I could access the AVD Manager.

In reply to IainW
Avatar
Haiz

Please revise ASAP. The deprecated commands make this tutorial not particularly useful.

Avatar
Carlos

Hi Jason, what i like to do is have some lines like this in ~/.bash-profile:

-------------------------------
#   1.  ENVIRONMENT CONFIGURATION
#   -------------------------------
#
#   Source Includes
#   ------------------------------------------------------------
    if [ -f ~/.bashrc ]; then
      . ~/.bashrc
    fi

    if [ -f ~/.bash_exports ]; then
      . ~/.bash_exports
    fi

    if [ -f /usr/local/etc/bash_completion ]; then
        . /usr/local/etc/bash_completion
    fi

That way i can just separate them in specific files for exports, aliases & bash autocompletion.

In reply to Jason Brown
Avatar
Emmet

android avd is simply not a command anymore - I'm sure this is a slight evolution but ever so frustrating that the entire tutorial is held up by this

In reply to Mário
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?