Skip to content

Instantly share code, notes, and snippets.

@mahimrocky
Last active July 13, 2018 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mahimrocky/09c55555917ebad1d32d167e48c4a02a to your computer and use it in GitHub Desktop.
Save mahimrocky/09c55555917ebad1d32d167e48c4a02a to your computer and use it in GitHub Desktop.
How to install or setup react native in windows? From this you can easily install react native

How to run REACT Native-Script

  • First install node.js from https://nodejs.org/en/download/
  • Install python 2.7+ from https://www.python.org/downloads/release/python-2715/
  • Ensure JDK installed
  • Create an environment variable: my Computer->Properties->Advanced System settings->Environment variable->new
  • Set variable ANDROID_HOME and set your sdk path. Typically sdk found c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk
  • Now run command: npm install -g react-native-cli
  • After completing download run: react-native init YourProjectName
  • Then cd YourProjectName
  • After completing download or creation of project run: react-native start (IT take time after complete goto step 10)
  • Then open Virtual device or Connect Device via USB and run: react-native run-android

If any problem to run APP, or showing error in your Device. Follow the Following command:

  • mkdir android/app/src/main/assets (In your project)

  • react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

  • react-native run-android

Happy native-script

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