Install React-Native using Yarn

First install react native cli: npm install g reactnativecli

Next, install Yarn

Finally, create a new app using the CLI: reactnative init AwesomeProject

This will use Yarn to first install react-native and then initialize your project…Capture.JPG

PS:

Add following environment variables after installing Android Studio, JDK ( Java SE Development Kit(JDK) and react native:

  • PATH
    • C:\Users\ACER\AppData\Local\Android\sdk\platform-tools
    • C:\Program Files\Java\jdk1.8.0_121\bin
    • C:\Program Files (x86)\Yarn\bin
    • C:\Users\ACER\AppData\Local\Android\sdk\tools
    • C:\Program Files\nodejs\
  • JAVA_HOME
    • C:\Program Files\Java\jdk1.8.0_121
  • ANDROID_HOME
    • C:\Users\ACER\AppData\Local\Android\sdk

PPS:

Make sure the Virtual Device is running (using android avd to launch device manager and start the device…and then “adb devices” to confirm running device). Note that if you’re unable to run the device then  install HAXM.

But if you’re unable to install HAXM using the SDK Manager, which says “haxm installer not compatible with windows”, then do the following

  1. download HAXM from Intel https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager.
  2. Unzip the file and Run intelhaxm-android.exe.
  3. Run silent_install.bat.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s