Android Studio is the official IDE for Android application development from google for Linux, windows and Mac OS. It is based on JetBrains IntelliJ IDEA and 100% free. It comes with gradle-based build system, android emulator, sample code templates and GitHub integration, Lint tools, C++ and NDK support, Google Cloud Platform support and Instant Run.
Install Android Studio
Note: Google recommends the bundled JDK which comes with Android Studio 2.2 and higher. You can configure the bundled JDK like below
Go to File -> Settings… -> Build, Execution, Deployment -> Build Tools -> Gradle.
In Gradle JDK, choose the Embedded JDK option and click OK.
You can also use the external Java JDK. If you don’t have java in your system, then in terminal app (ctrl+alt+t) run below commands to install JDK.
sudo apt update
sudo apt install default-jdk
You can check the installed jdk version using this command.
java -version
Download Android Studio
Go to the below Android Studio download link and download the latest version of Android Studio for Linux and save it on your Downloads folder. Here the downloaded file name is “android-studio-2020.3.1.26-linux.tar.gz“. It will change based on your android studio version.
Unzip the Android Studio .tar.gz file by right click on the downloaded file and select extract here option. Now inside of the extracted folder you will find the android-studio folder.
Copy that folder and paste it where you wish to install the program. For me its Home Folder.
Open the command line tool Terminal (ctrl+alt+t) and type below code in terminal and press the enter key.
cd android-studio/bin
Then type below command and press enter
./studio.sh
Follow all the steps, complete the Android studio setup wizard. During the setup, it will download and install Android Emulator,Android SDK Build-Tools,Android SDK Platform,Android SDK Platform-Tools, Android SDK Tools,Android Support Repository,Google Repository,SDK Patch Applier,Sources for Android.
Tip: To create application launcher icon on the Ubuntu Dash for Android Studio, click the Tools menu and select the Create desktop Entry..
Some of the tools that are part of the Android SDK are only available as 32-bit binaries for Linux. If you are using a 64-bit system, these binaries will not run out-of-the-box and you get error message.
To fix this
7.open terminal and type the below command and press enter.
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1
And try the installation process.
Install Android Studio via Snap:
You can also install Android Studio via the snap package file. In terminal application run below Android Studio snap installation command. It will install the latest version of Android Studio on your Ubuntu system.
sudo snap install android-studio --classic
You can uninstall it via below command.
sudo snap remove android-studio
That’s all.