This project has steps to setup environment for react-native projects
https://facebook.github.io/react-native/docs/getting-started.html
copy and paste the following command in cmd. make sure you have opened cmd as administrator user in windows.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
To check whether chocolate installed or not in system check chocolate version by below command
choco -version or choco -v
choco install nodejs.install - responsible for node js installation
choco install python2 - responsible for python2 installation
Note: If you have already installed Node on your system, make sure it is version 4 or newer. If you already have a JDK on your system, make sure it is version 8 or newer.
If you have already java installed machine skip this option or otherwise install java from http://www.oracle.com or else use below command
choco install jdk8
Make sure you have set Jdk path as environment variable as ####JAVA_HOME as system variable.
Install this using
npm install -g react-native-cli
Download Android studio from https://developer.android.com/studio/index.html.
Make sure you have set Android SDK path as environment variable as ####ANDROID_HOME as system variable.
Create ReactNative Project by using below command
react-native init AwesomeProject
then move the project directory by using below
cd AwesomeProject
then run project using
react-native run-android
Note: If you want to run server in separate window use
react-native start
command.