iOs

Setup React Native for Android & iOS Development

Google+ Pinterest LinkedIn Tumblr +

Video is ready, Click Here to View ×


Tutorial for setting up React Native development environment for developing Android & iOS on Mac.

React Native Docs:

Homebrew:

NVM:

JDK:

Virtualbox:

Genymotion:

Remove Android Studio:

Subscribe to the channel:
Follow me on Twitter:

Share.

About Author

26 Comments

  1. Thank you for a truly excellent walk-through. I listened once to get an overview, and on second listen I'm following along, and there are many helpful points you mention. It's an involved setup and I'm sure others will find this information useful too.

  2. Thanks for your video.

    But I have an issue trying to following your tutorial.

    After running "react-native run-android". I got the following message. It would be awesome if you happen to know how to answer it.

    Starting JS server…
    Running adb reverse tcp:8081 tcp:8081
    error: closed
    Could not run adb reverse: Command failed: adb reverse tcp:8081 tcp:8081
    Building and installing the app on the device (cd android && ./gradlew installDebug…
    Exception in thread "main" java.io.FileNotFoundException: /Users/Well/.gradle/wrapper/dists/gradle-2.4-all/6r4uqcc6ovnq6ac6s0txzcpc0/gradle-2.4-all.zip.lck (No such file or directory)
    at java.io.RandomAccessFile.open0(Native Method)
    at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
    at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:49)
    at org.gradle.wrapper.Install.createDist(Install.java:46)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    Could not install the app on the device, read the error above for details.
    Make sure you have an Android emulator running or a device connected and have
    set up your Android development environment:
    https://facebook.github.io/react-native/docs/android-setup.html

  3. Followed the above steps not able to find react-natve command refer below console commands and its output:

    Bhushans-MBP:node_modules bhushanraut$ npm install -g react-native-cli
    /Users/bhushanraut/.npm-packages/bin/react-native -> /Users/bhushanraut/.npm-packages/lib/node_modules/react-native-cli/index.js
    /Users/bhushanraut/.npm-packages/lib
    └── react-native-cli@1.2.0

    Bhushans-MBP:node_modules bhushanraut$ react-native init AwesomeProject
    -bash: react-native: command not found

    Please help me to resolve this.Thanks in advance.

  4. Thanks for the Tutorial an, very helpful. Let me ask you something, If I had to build an application that is 100% powered by a SOAP WebService, where should I start searching/learning and is it possible to do it with React Native??

  5. Thank you. Sir i went through all the process u showed above sucesfuly. But after starting ios in emulator i cant find the editor where i can actually write my javascript code. How to open that thing where i can starting writing code for either ios or android. Please help

  6. Thanks for Video…
    But get Error:

    * What went wrong:
    Execution failed for task ':app:installDebug'.
    > com.android.builder.testing.api.DeviceException: No connected devices!

    * Try:
    Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output.

    BUILD FAILED

    Total time: 14.805 secs
    Could not install the app on the device, read the error above for details.
    Make sure you have an Android emulator running or a device connected and have
    set up your Android development environment:
    https://facebook.github.io/react-native/docs/android-setup.html

  7. Could you help me please? i would like to run on a device but something wrong with bundle.

    "xCode couldn't find a provisioning profile matching 'org.reactjs.native.example.weekdays.' "

    it cannot be registered to my development team.
    Many thanks!

  8. if the android not running you can test this :
    Go to the android/ directory of your react-native project

    Create a file called local.properties with this line:
    sdk.dir = /Users/USERNAME/Library/Android/sdk

    sdk.dir = /Users/USERNAME/Library/Android/sdk
    Where USERNAME is your OSX username

  9. Great video ! Some changes in commands here.

    Installing Android SDK using homebrew:
    brew tap caskroom/cask
    brew install brew-cask
    brew cask install android-sdk

    Install latest version of node:
    nvm install node

  10. OCT 2017 UPDATE : Android 'sdkmanager' is no longer launchable with just an 'android' in the command-line/terminal. Seems there's a real push to get us to use Android Studio rather than terminal/sdkmanager. In fact, going onto developer.android.com gets you zero documentation for this method too. Not really sure where to go now as the RN documentation leans on that quite heavily also.