From 6a96d2278ddbc46406bd33b3e25b436d2a9c5414 Mon Sep 17 00:00:00 2001 From: Christopher Dro Date: Mon, 27 Jun 2016 11:25:45 -0700 Subject: [PATCH] Update instructions for pointing Gradle to Android SDK Summary: Closes #8439 Closes https://github.com/facebook/react-native/pull/8446 Differential Revision: D3489034 fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895 --- docs/AndroidBuildingFromSource.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/AndroidBuildingFromSource.md b/docs/AndroidBuildingFromSource.md index 5336f668ed7d26..9c4cdb916fbb7a 100644 --- a/docs/AndroidBuildingFromSource.md +++ b/docs/AndroidBuildingFromSource.md @@ -20,13 +20,25 @@ Make sure you have the following installed: 3. Local Maven repository for Support Libraries (formerly `Android Support Repository`) >= 17 (for Android Support Library) 4. Android NDK (download links and installation instructions below) -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: +### Point Gradle to your Android SDK: + +**Step 1:** Set environment variables through your local shell. + +Note: Files may vary based on shell flavor. See below for examples from common shells. + +- bash: `.bash_profile` or `.bashrc` +- zsh: `.zprofile` or `.zshrc` +- ksh: `.profile` or `$ENV` + +Example: ``` -sdk.dir=absolute_path_to_android_sdk -ndk.dir=absolute_path_to_android_ndk +export ANDROID_SDK=/Users/your_unix_name/android-sdk-macosx +export ANDROID_NDK=/Users/your_unix_name/android-ndk/android-ndk-r10e ``` +**Step 2:** Create a `local.properties` file in the `android` directory of your react-native app with the following contents: + Example: ```