To set ANDROID_HOME environment on ubuntu 20.04 visit Ubuntu's snap store and install Android studio and then open
vim $HOME/.bashrc
And set the environment variables as follows:
export ANDROID_HOME=${HOME}/Android/Sdkexport PATH=${ANDROID_HOME}/tools:${PATH}export PATH=${ANDROID_HOME}/emulator:${PATH}export PATH=${ANDROID_HOME}/platform-tools:${PATH}
With recent versions of Android studio replace ANDROID_HOME with ANDROID_SDK_ROOT otherwise builds will complain that ANDROID_HOME is deprecated.