Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc(android): document ZSH setup for macOS Catalina and newer #1360

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 25 additions & 6 deletions www/docs/en/dev/guide/platforms/android/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,31 +282,50 @@ It is also recommended to update the `PATH` environment variable to include the

_**Note:** The directories above are generally located in the Android SDK ROOT._

#### macOS and Linux
#### Linux and macOS

On a Mac or Linux, with a text editor, create or modify the `~/.bash_profile` file.
On Linux or macOS versions prior to Catalina, use any text editor to create or modify the `~/.bash_profile` file.
<br>On macOS Catalina and newer, create or modify the `~/.zprofile` file, as the default shell has changed.

To set an environment variable, add a line that uses `export` like so (substitute the path with your local installation):
Add the following line to your shell's profile to set up the `ANDROID_HOME` environment variable.

**Linux:**

```bash
export ANDROID_HOME=/Development/android-sdk/
export ANDROID_HOME=~/Android/Sdk
```

To update your `PATH`, add a line resembling the following (substitute the paths with your local Android SDK installation's location):
**macOS:**

```bash
export ANDROID_HOME=~/Library/Android/sdk
```

The above examples point to the standard paths where the Android SDK is typically stored. Depending on your environment configuration, the path may differ. Be sure to confirm that the path exist or adjust them to match your local installation.

After setting the `ANDROID_HOME` environment variable, update the `PATH` variable to include directories containing various Android-related binaries.

```bash
export PATH=$PATH:$ANDROID_HOME/platform-tools/
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin/
export PATH=$PATH:$ANDROID_HOME/build-tools
export PATH=$PATH:$ANDROID_HOME/build-tools/
export PATH=$PATH:$ANDROID_HOME/emulator/
```

Reload your terminal to see this change reflected or run the following command:

**Linux and macOS older then Catalina:**

```bash
source ~/.bash_profile
```

**macOS Catalina and newer:**

```bash
source ~/.zprofile
```

#### Windows

These steps may vary depending on your installed version of Windows. Close and reopen any command prompt windows after making changes to see them reflected.
Expand Down
Loading