Skip to content

Setting up React Native

Philippe Cohen edited this page Aug 8, 2016 · 20 revisions

This procedure is the details procedure as defined in the React Native Getting Started

Step by step

To install react native you need to make sure you have:

  • nodeJS curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs sudo apt-get install -y build-essential This will also install the npm, the Node.js package manager.

  • JAVA Open java download, we choose Java SE Development Kit 8u102: java 64x. Open the new folder (java) location and do extract to download. Move this folder to opt:

     sudo tar -xvf ~/Downloads/jdk-8u102-linux-x64.tar.gz
     sudo unzip ~/Downloads/jdk1.8.0_102 -d /opt
    

#3. Android Start to [downloadAndroid] (https://developer.android.com/studio/index.html). Move the new folder to opt:

 sudo unzip ~/Downloads/android-studio-ide-143.2915827-linux.zip -d /opt

Order the PATH

 vi .zshrc

add to PATH:"/opt/java/jdk1.8.0_102/bin:/opt/google/android-studio/bin:" save.

 source .zshrc    
 rehash

try

   which java\ which studio.sh

Open Android

install:

   sudo apt-get install lib32stdc++6
   exec studio.sh

Change in the BOIS (fn+f2 when restarting the computer...), change intel virtual technologic to unable

New you can open your emulator.

React-native

   npm install -g react-nativ-cli
   react-native init AweSomeProject
   cd AweSomeProjec

Open Andriod and choose: Tool/systemSetting/AndroidSDK:(IMAGE!)

Add to your PATH (in your .zshrc) :"/Android/Sdk/tools/:/Android/Sdk/platform-tools/:"

        source ~/.zshrc
        rehash
        android list sdk -a

look in the list and find this lines:

  • 6- Android SDK Build-tools, revision 23.0.3
  • 7- Android SDK Build-tools, revision 23.0.2
  • 8- Android SDK Build-tools, revision 23.0.1
  • 9- Android SDK Build-tools, revision 23 (Obsolete)

check what thier numbers and write:

 - android update sdk -a -u -t 9
 - android update sdk -a -u -t 8
 - android update sdk -a -u -t 7
 - android update sdk -a -u -t 6

and doing:

   sudo apt-get install lib32z1
   cd Awesomeproject
   emulator -avd <your emulator name>
   react-native run-android