From a7377daff7491fefafdeff8c244ec91d02763055 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Thu, 3 Dec 2015 14:50:49 +0000 Subject: [PATCH] update website --- docs/android-building-from-source.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/android-building-from-source.html b/docs/android-building-from-source.html index 6259a867897..06f759f7c6b 100644 --- a/docs/android-building-from-source.html +++ b/docs/android-building-from-source.html @@ -1,6 +1,6 @@ Building React Native from source – React Native | A framework for building native apps using React

Building React Native from source

You will need to build React Native from source if you want to work on a new feature/bug fix, try out the latest features which are not released yet, or maintain your own fork with patches that cannot be merged to the core.

Prerequisites #

Assuming you have the Android SDK installed, run android to open the Android SDK Manager.

Make sure you have the following installed:

  1. Android SDK version 23 (compileSdkVersion in build.gradle)
  2. SDK build tools version 23.0.1 (buildToolsVersion in build.gradle])
  3. Android Support Repository >= 17 (for Android Support Library)
  4. Android NDK (download & extraction instructions here)

Point Gradle to your Android SDK: either have $ANDROID_SDK and $ANDROID_NDK defined, or create a local.properties file in the root of your react-native checkout with the following contents:

sdk.dir=absolute_path_to_android_sdk ndk.dir=absolute_path_to_android_ndk

Example:

sdk.dir=/Users/your_unix_name/android-sdk-macosx -ndk.dir=/Users/your_unix_name/android-ndk/android-ndk-r10e

Building the source #

  1. Install react-native from your fork. For example, to install the master branch from the offcial repo, run the following:
npm install --save github:facebook/react-native#master

Alternatively, you can clone the repo to your node_modules directory and run npm install inside the cloned repo.

  1. Add gradle-download-task as dependency in andoid/build.gradle:
... +ndk.dir=/Users/your_unix_name/android-ndk/android-ndk-r10e

Building the source #

  1. Install react-native from your fork. For example, to install the master branch from the offcial repo, run the following:
npm install --save github:facebook/react-native#master

Alternatively, you can clone the repo to your node_modules directory and run npm install inside the cloned repo.

  1. Add gradle-download-task as dependency in android/build.gradle:
... dependencies { classpath 'com.android.tools.build:gradle:1.3.1' classpath 'de.undercouch:gradle-download-task:2.0.0' @@ -8,7 +8,7 @@ ndk.dir= // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } -...
  1. Add the :ReactAndroid project in andoid/settings.gradle:
... +...
  1. Add the :ReactAndroid project in android/settings.gradle:
... include ':ReactAndroid' project(':ReactAndroid').projectDir = new File(rootProject.projectDir, '../node_modules/react-native/ReactAndroid')