diff --git a/docs/_getting-started-linux-android.md b/docs/_getting-started-linux-android.md index ae4d03f1d3b..80313a7c5b1 100644 --- a/docs/_getting-started-linux-android.md +++ b/docs/_getting-started-linux-android.md @@ -47,23 +47,21 @@ Next, select the "SDK Tools" tab and check the box next to "Show Package Details Finally, click "Apply" to download and install the Android SDK and related build tools. -

3. Configure the ANDROID_HOME environment variable

+

3. Configure the ANDROID_SDK_ROOT environment variable

The React Native tools require some environment variables to be set up in order to build apps with native code. Add the following lines to your `$HOME/.bash_profile` or `$HOME/.bashrc` (if you are using `zsh` then `~/.zprofile` or `~/.zshrc`) config file: ```shell -export ANDROID_HOME=$HOME/Android/Sdk -export PATH=$PATH:$ANDROID_HOME/emulator -export PATH=$PATH:$ANDROID_HOME/tools -export PATH=$PATH:$ANDROID_HOME/tools/bin -export PATH=$PATH:$ANDROID_HOME/platform-tools +export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk +export PATH=$PATH:$ANDROID_SDK_ROOT/emulator +export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools ``` > `.bash_profile` is specific to `bash`. If you're using another shell, you will need to edit the appropriate shell-specific config file. -Type `source $HOME/.bash_profile` for `bash` or `source $HOME/.zprofile` to load the config into your current shell. Verify that ANDROID_HOME has been set by running `echo $ANDROID_HOME` and the appropriate directories have been added to your path by running `echo $PATH`. +Type `source $HOME/.bash_profile` for `bash` or `source $HOME/.zprofile` to load the config into your current shell. Verify that ANDROID_SDK_ROOT has been set by running `echo $ANDROID_SDK_ROOT` and the appropriate directories have been added to your path by running `echo $PATH`. > Please make sure you use the correct Android SDK path. You can find the actual location of the SDK in the Android Studio "Preferences" dialog, under **Appearance & Behavior** → **System Settings** → **Android SDK**. diff --git a/docs/_getting-started-macos-android.md b/docs/_getting-started-macos-android.md index 2c76632498f..61993153f99 100644 --- a/docs/_getting-started-macos-android.md +++ b/docs/_getting-started-macos-android.md @@ -61,34 +61,25 @@ Select the "SDK Platforms" tab from within the SDK Manager, then check the box n - `Android SDK Platform 30` - `Intel x86 Atom_64 System Image` or `Google APIs Intel x86 Atom System Image` -Next, select the "SDK Tools" tab and check the box next to "Show Package Details" here as well. Look for and expand the "Android SDK Build-Tools" entry, then make sure that `30.0.2` is selected and check the "Android SDK Command-line Tools (latest)". +Next, select the "SDK Tools" tab and check the box next to "Show Package Details" here as well. Look for and expand the "Android SDK Build-Tools" entry, then make sure that `30.0.2` is selected. Finally, click "Apply" to download and install the Android SDK and related build tools. -You can also run the following command after setting ANDROID_HOME. - -```shell -sdkmanager "platforms;android-30" "system-images;android-30;default;x86_64" "system-images;android-30;google_apis;x86" -sdkmanager "cmdline-tools;latest" "build-tools;30.0.2" -``` - -

3. Configure the ANDROID_HOME environment variable

+

3. Configure the ANDROID_SDK_ROOT environment variable

The React Native tools require some environment variables to be set up in order to build apps with native code. Add the following lines to your `$HOME/.bash_profile` or `$HOME/.bashrc` (if you are using `zsh` then `~/.zprofile` or `~/.zshrc`) config file: ```shell -export ANDROID_HOME=$HOME/Library/Android/sdk -export PATH=$PATH:$ANDROID_HOME/emulator -export PATH=$PATH:$ANDROID_HOME/tools -export PATH=$PATH:$ANDROID_HOME/tools/bin -export PATH=$PATH:$ANDROID_HOME/platform-tools +export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk +export PATH=$PATH:$ANDROID_SDK_ROOT/emulator +export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools ``` > `.bash_profile` is specific to `bash`. If you're using another shell, you will need to edit the appropriate shell-specific config file. -Type `source $HOME/.bash_profile` for `bash` or `source $HOME/.zprofile` to load the config into your current shell. Verify that ANDROID_HOME has been set by running `echo $ANDROID_HOME` and the appropriate directories have been added to your path by running `echo $PATH`. +Type `source $HOME/.bash_profile` for `bash` or `source $HOME/.zprofile` to load the config into your current shell. Verify that ANDROID_SDK_ROOT has been set by running `echo $ANDROID_SDK_ROOT` and the appropriate directories have been added to your path by running `echo $PATH`. > Please make sure you use the correct Android SDK path. You can find the actual location of the SDK in the Android Studio "Preferences" dialog, under **Appearance & Behavior** → **System Settings** → **Android SDK**.