In this guide, we are going to see the Steps to Set Path Environment Variable for ANDROID SDK in Ubuntu.
Example: if you are using an Ionic Framework we need to Set a Proper Environment Variable path for ANDROID_HOME to Generate an APK From Ubuntu via Ionic-CLI and Android SDK.
Set Set Path Environment Variables for Android SDK
Set Environment variable path for ANDROID_HOME and ANDROID_SDK
- Open .bashrc profile
nano .bashrc
- Copy and Paste this Below export Environment Variables on .bashrc Profile
export ANDROID_HOME=/home/SU-USERNAME/Android/Sdk
export ANDROID_SDK=/home/SU-USERNAME/Android/Sdk
export PATH=$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$PATH
- Replace /home/SU-USERNAME/Android/Sdk with your SDK Installed path
- CTRL + X to Save the File & Enter to Exit
- reload the .bashrc profile
source ~/.bashrc
- Verify the path Environment Variable for SDK
$ANDROID_HOME
$ANDROID_SDK
- That's all & don't forget to set the Environment Variables For Oracle Java JDK to...