Note: Android no longer supports Studio for 32 bit Linux / Ubuntu platforms hence you will need only 64 bit platforms for development on Ubuntu.
The prerequisite to make sure we can compile Android applications using command line, is we need to install JDK as,
$ sudo apt-get install openjdk-8-jdk
Visit website https://developer.android.com/studio/
Click on “Download Android Studio” button to download latest version of Android Studio.
Once you click on Download, you will be asked to Accept the terms and conditions. After accepting, it will download an android-studio-2020.3.1.24-linux.tar.gz ( It could be different when you download, this was latest when we installed ) at your machine.
To install Android Studio on Linux, proceed as follows:
$ cd /home/myuser/devlab
Copy android-studio-ide-183.5452501-linux.tar.gz to /home/myuser/devlab
$ mv ~/Downloads/android-studio-2020.3.1.24-linux.tar.gz .
$ tar xvf android-studio-2020.3.1.24-linux.tar.gz
The above command will extract the android studio at /home/devlab/devlab/android-studio
You can launch the android studio as,
$ cd android-studio
$ cd bin
$ ./studio.sh
Follow the setup Wizard, and If you continue with first start, it will download the Android SDK required for compilation of android apps at
SDK Folder: /home/devlab/Android/Sdk
Total Download Size approx. : 698 MB