Skip to content

Commit

Permalink
Update instructions for pointing Gradle to Android SDK
Browse files Browse the repository at this point in the history
Summary:
Closes #8439
Closes #8446

Differential Revision: D3489034

fbshipit-source-id: 7cb50a43e64e216512294eaec06690dc9f3d6895
  • Loading branch information
christopherdro authored and Facebook Github Bot 8 committed Jun 27, 2016
1 parent 550db2f commit 9c89221
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions docs/AndroidBuildingFromSource.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
Expand Down

0 comments on commit 9c89221

Please sign in to comment.