ObjectiveInstall Android Studio on Ubuntu 18.04
DistributionsUbuntu 18.04 Bionic Beaver
RequirementsA working install of Ubuntu 18.04 with root privileges.
- # - requires given linux commands to be executed with root privileges either directly as a root user or by use of
- $ - requires given linux commands to be executed as a regular non-privileged user
IntroductionIf you're serious about developing for Andorid, or you just want to play around and see what app development is all about, Android Studio is the best option out there. It's the official IDE developed by Google for writing Android apps.
Google developed Android Studio for Ubuntu. Up until recently, Google did all of their development on Ubuntu. They just switched over to Debian, in case you were wondering. Either way, it's similar, so coding for Android on Ubuntu is a good idea.
Installing Android Studio on Ubuntu isn't difficult. It's not in the official repositories, but it's still very easy to get set up.
Install JavaEverything on Android is done in Java. In order to use Android Studio, you're going to need to have a recent version of Java installed on your Ubuntu 18.04 system. Thankfully, those packages are available in the official Ubuntu repositories, so you can install them with Apt.
$ sudo apt install openjdk-8-jre openjdk-8-jdk
Install From A SnapSnaps are a great thing. They provide a channel for third party software like Android Studio to be be distributed to every Linux distribution without the need to package and re-package. Android Studio is available as a Snap, and Ubuntu comes with the Snap package manager installed by default, so you only need to install it.
$ sudo snap install android-studio
That's it! Android Studio is installed.