Setup android environment var on mac os

Whenever you start with new OS installation or with a new machine and leading to android app development, we need to setup PATH environment variables. So maybe you have ‘android SDK’ downloaded or ‘android studio’ running.

To add environment variables permanently, need to add those in .bash_profile file, which doesn’t exist, we need to make one by typing following command in terminal.

nano ~/.bash_profile // create add following code in file

export ANDROID_HOME=/path-to-android-folder/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH

Close terminal, open again try cmd android it should open Android SDK Manager

Best of luck 🙂

Leave a comment

Your email address will not be published. Required fields are marked *