From f73888d5e6f3261c9a54237552bda9d1fd899111 Mon Sep 17 00:00:00 2001 From: Henry Hobhouse Date: Thu, 3 Mar 2022 15:53:55 +0000 Subject: [PATCH 1/6] refactor(getting-started): env var for sdk path --- docs/_getting-started-macos-android.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/_getting-started-macos-android.md b/docs/_getting-started-macos-android.md index 2c76632498f..626fe7450fd 100644 --- a/docs/_getting-started-macos-android.md +++ b/docs/_getting-started-macos-android.md @@ -65,30 +65,29 @@ 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. -You can also run the following command after setting ANDROID_HOME. +You can also run the following command after setting ANDROID_SDK_ROOT. ```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/cmdline-tools/latest/bin +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**. From a457ec9ff4fca3229873747b95c158a859ed5019 Mon Sep 17 00:00:00 2001 From: Henry Hobhouse Date: Thu, 3 Mar 2022 15:56:48 +0000 Subject: [PATCH 2/6] refactor(getting-started): update path sdk linux --- docs/_getting-started-linux-android.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/_getting-started-linux-android.md b/docs/_getting-started-linux-android.md index ae4d03f1d3b..92bbb109b0f 100644 --- a/docs/_getting-started-linux-android.md +++ b/docs/_getting-started-linux-android.md @@ -47,23 +47,22 @@ 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/cmdline-tools/latest/bin +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**. From 2c9d7f1ea3a1afed3851c9c8fb419f6960366fc1 Mon Sep 17 00:00:00 2001 From: Henry Hobhouse Date: Fri, 4 Mar 2022 10:10:15 +0000 Subject: [PATCH 3/6] refactor(getting-started): explain versioning --- docs/_getting-started-linux-android.md | 1 + docs/_getting-started-macos-android.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/_getting-started-linux-android.md b/docs/_getting-started-linux-android.md index 92bbb109b0f..3d997479133 100644 --- a/docs/_getting-started-linux-android.md +++ b/docs/_getting-started-linux-android.md @@ -56,6 +56,7 @@ Add the following lines to your `$HOME/.bash_profile` or `$HOME/.bashrc` (if you ```shell export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk export PATH=$PATH:$ANDROID_SDK_ROOT/emulator +# Commandline Path is determined by version "/cmdline-tools/[VERSION]/bin" latest is the default from Android studio but please check you setup within the SDK Manager export PATH=$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools ``` diff --git a/docs/_getting-started-macos-android.md b/docs/_getting-started-macos-android.md index 626fe7450fd..6c281fcc52e 100644 --- a/docs/_getting-started-macos-android.md +++ b/docs/_getting-started-macos-android.md @@ -81,6 +81,7 @@ Add the following lines to your `$HOME/.bash_profile` or `$HOME/.bashrc` (if you ```shell export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk export PATH=$PATH:$ANDROID_SDK_ROOT/emulator +# Commandline Path is determined by version "/cmdline-tools/[VERSION]/bin" latest is the default from Android studio but please check you setup within the SDK Manager export PATH=$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools ``` From df9a90b98f8109a1b5cef6388c0b9b571fcd566d Mon Sep 17 00:00:00 2001 From: Henry Hobhouse Date: Fri, 4 Mar 2022 16:12:48 +0000 Subject: [PATCH 4/6] refactor(getting-started): rm cmdline path - linux --- docs/_getting-started-linux-android.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/_getting-started-linux-android.md b/docs/_getting-started-linux-android.md index 3d997479133..80313a7c5b1 100644 --- a/docs/_getting-started-linux-android.md +++ b/docs/_getting-started-linux-android.md @@ -56,8 +56,6 @@ Add the following lines to your `$HOME/.bash_profile` or `$HOME/.bashrc` (if you ```shell export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk export PATH=$PATH:$ANDROID_SDK_ROOT/emulator -# Commandline Path is determined by version "/cmdline-tools/[VERSION]/bin" latest is the default from Android studio but please check you setup within the SDK Manager -export PATH=$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools ``` From bb6164b03a81fedf00b10585610ace765dd6acfa Mon Sep 17 00:00:00 2001 From: Henry Hobhouse Date: Thu, 10 Mar 2022 13:51:21 +0000 Subject: [PATCH 5/6] revert(getting-started): rm path to sdkmanager --- docs/_getting-started-macos-android.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/_getting-started-macos-android.md b/docs/_getting-started-macos-android.md index 6c281fcc52e..f2f4e82236e 100644 --- a/docs/_getting-started-macos-android.md +++ b/docs/_getting-started-macos-android.md @@ -65,13 +65,6 @@ 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. -You can also run the following command after setting ANDROID_SDK_ROOT. - -```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_SDK_ROOT environment variable

The React Native tools require some environment variables to be set up in order to build apps with native code. @@ -81,8 +74,6 @@ Add the following lines to your `$HOME/.bash_profile` or `$HOME/.bashrc` (if you ```shell export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk export PATH=$PATH:$ANDROID_SDK_ROOT/emulator -# Commandline Path is determined by version "/cmdline-tools/[VERSION]/bin" latest is the default from Android studio but please check you setup within the SDK Manager -export PATH=$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools ``` From 0700fe5f904e18a80c8a096ee1992f4db5b27842 Mon Sep 17 00:00:00 2001 From: Henry Hobhouse Date: Thu, 10 Mar 2022 13:54:28 +0000 Subject: [PATCH 6/6] refactor(getting-started): rm ref to cmdline tools --- docs/_getting-started-macos-android.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_getting-started-macos-android.md b/docs/_getting-started-macos-android.md index f2f4e82236e..61993153f99 100644 --- a/docs/_getting-started-macos-android.md +++ b/docs/_getting-started-macos-android.md @@ -61,7 +61,7 @@ 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.