Firstly, get the Android SDK location in Android Studio : Android Studio -> Preferences -> Appearance & Behaviour -> System Settings -> Android SDK -> Android SDK Location
Then execute the following commands in terminal
export ANDROID_HOME=Paste here your SDK location
export PATH=$PATH:$ANDROID_HOME/bin
It is done.