From beca621a788626db86de3d248e374cd1627c42da Mon Sep 17 00:00:00 2001 From: Manuel Beck Date: Sat, 5 Apr 2025 10:11:49 +0200 Subject: [PATCH] Android guide: How to get java home path on mac - Add a shell command how to get the current java home path - Add ANDROID_HOME section to separate the guide from the JAVA_HOME guide - Add "Reload Terminal" section --- .../12.x-2025.01/guide/platforms/android/index.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/www/docs/en/12.x-2025.01/guide/platforms/android/index.md b/www/docs/en/12.x-2025.01/guide/platforms/android/index.md index 853b71e5e0..ea799b589c 100644 --- a/www/docs/en/12.x-2025.01/guide/platforms/android/index.md +++ b/www/docs/en/12.x-2025.01/guide/platforms/android/index.md @@ -297,6 +297,7 @@ _**Note:** The directories above are generally located in the Android SDK ROOT._ On Linux or macOS versions prior to Catalina, use any text editor to create or modify the `~/.bash_profile` file.
On macOS Catalina and newer, create or modify the `~/.zprofile` file, as the default shell has changed. +##### ANDROID_HOME Add the following line to your shell's profile to set up the `ANDROID_HOME` environment variable. **Linux:** @@ -322,6 +323,18 @@ export PATH=$PATH:$ANDROID_HOME/build-tools/ export PATH=$PATH:$ANDROID_HOME/emulator/ ``` +#### JAVA_HOME + +**macOS:** + +When you installed the Java Development Kit like described in this guide you can get the java home path executing + +`echo $(/usr/libexec/java_home)` + +Set `JAVA_HOME` like you already did it for `ANDROID_HOME`. + +### Reaload Terminal + Reload your terminal to see this change reflected or run the following command: **Linux and macOS older then Catalina:**