I\'ve read pretty much read every article from google search, watched all the YouTube tutorials and checked out all the StackOverflow questions relating to this but cannot find
Windows 10
Install Java SE Development Kit 8
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Install Android SDK Manager
http://filehippo.com/download_android_sdk/
Install the options that are already selected when you open the SDK Manager
• Android SDK Tools
• Android SDK Platform-tools
• Android SDK Build-tools
• Android 8.0.0 (API 26)
• Extras > Google USB Driver
Navigate to Control Panel \ System and Security \ System \ Advanced System Settings \ Environment Variables
For User Variables
select Path
and click Edit...
.
Click New
and add these:
• C:\Users\
PC-NAME
\AppData\Local\Android\android-sdk\tools
• C:\Users\
PC-NAME
\AppData\Local\Android\android-sdk\platform-tools
• C:\Program Files\Java\jdk1.8.0_144
Now to confirm that it works, open cmd
and type in android
, the Android SDK Manager should open up.
NOTE: I suggest using the default command prompt
over a third party one such as Git Bash
. With cmd
, when you run commands such as npm install
, you actually get a loading bar where as in Git bash
, you don't get one. Some commands that work properly in cmd
such as android
will not be recognized by Git bash
.
Now in the command prompt, cd
to the Desktop.
Run these commands:
• npm install -g create-react-native-app
• create-react-native-app my-app
• cd my-app/
• npm start
Mac Users
Assuming you already have:
Now let's download only command line tools (which is bottom of ) this link
Follow these steps wisely:
unzip the folder in /opt/andriod directory
export ANDROID_HOME=/opt/android
echo "export ANDROID_HOME=/opt/android" >> ~/.bashrc
/opt/android/tools/bin/sdkmanager "platforms;android-23" "build-tools;23.0.1" "add-ons;addon-google_apis-google-23"
You are all done.Congrats! if you made it all.Now from RN proj. folder run:
react-native run-android