More and more, Android app improvement on Linux is rising. The principle cause behind that is that the Linux platform makes it tremendous straightforward to get a full developer workstation going (in comparison with different platforms.) Development is one among Linux’s robust fits, so naturally, establishing Android improvement instruments on Linux is straightforward.
SPOILER ALERT: Scroll down and watch the video tutorial on the finish of this text.
Android Development Tools On Linux
Android Studio is Google’s full improvement suite for creating software program on the Android platform. It comes with dozens of instruments, emulation setup, and code to work with.
Be aware: Earlier than making an attempt to put in this software program, please set up Java. Failing to put in Java will make Android Studio unusable.
Set up Java
Getting Java for Linux differs, relying on the working system you’re utilizing. Usually, most Linux distributions have wonderful assist for OpenJDK. It’s an open implementation of the Java instruments. It’s greatest to go this route, and most builders received’t discover the distinction. Observe the directions beneath to get Java working in your distribution.
Be aware: except for OpenJDK, you might want to put in different dependencies to run Android Studio in your Linux PC. For more information, check out the official guide page for Linux.
Ubuntu
Ubuntu customers have quick access to OpenJDK. As of Ubuntu model 18.04, OpenJDK 11 is accessible. To set up it, open up a terminal and use the Apt package deal administration device to get it going.
sudo apt set up openjdk-11-jdk
Want extra than simply the usual OpenJDK 11 package deal? Check out these other packages.
Debian
Debian is a Linux distribution that focuses totally on stable, secure software program. It’s due to this, absolutely the newest model of OpenJDK is tough to get ahold of (model 11). Nonetheless, it’s doable to get model 8, which is practical.
Be aware: if you happen to completely need to have model 11, think about upgrading Debian from “Stable” to “Testing,” or on the very least utilizing backports.
sudo apt-get set up openjdk-8-jdk
Alternatively, set up all Java JDK 10 stuff into Debian with:
sudo apt-get set up openjdk-8-*
Arch Linux
Arch Linux is bleeding edge Linux, so there’s no situation getting a reasonably present model of OpenJDK working accurately. Sadly, regardless of how current Arch is, there’s at present no builds of model 11. Nonetheless, customers have entry to OpenJDK 10, which is pretty new.
To set up the software program, open up a terminal and use the Pacman packaging device to get it working.
sudo pacman -S jdk10-openjdk
Fedora
Fedora Linux has model 10 of OpenJDK, which needs to be sufficient to run and develop on Android Studio. To set up it, use the DNF package deal administration device within the terminal.
sudo dnf set up java-openjdk -y
OpenSUSE
Relying on what model of OpenSUSE you employ, your packages are both very new or very previous. For that reason, getting one model of OpenJDK working throughout all variations of SUSE is a bit tough.
To get OpenJDK working, head over to the download page for OpenSUSE. On the obtain web page, choose the model of OpenJDK you’d like, then click on the “install” button to start out the set up course of.
Generic Linux
Many Linux distributions (even the obscure ones) use OpenJDK as a result of it’s secure to incorporate in software program repositories. Because of this, putting in OpenJDK is extremely straightforward. To get it working open up a terminal and search your package deal supervisor for “OpenJDK”. Alternatively, download it from the official website.
Obtain Android Studio
Sadly, Android Studio doesn’t have a downloadable binary package deal. As a substitute, customers trying to make use of the event suite on Linux might want to obtain a compressed archive file.
Head over to the official download page and click on on the Linux obtain hyperlink. Learn by way of the EULA and verify the field to simply accept the settlement to start out the obtain. When the obtain finishes, open up a terminal window and use the Unzip device extract Android Studio.
cd ~/Downloads unzip android-studio-ide-*-linux.zip
Utilizing the CD command, transfer the terminal into the bin subfolder.
cd android-studio/bin
Set up Android Studio
Begin the Android Studio set up device with:
./studio.sh
Within the Android Studio Wizard, choose the “Standard” possibility. When the Android Studio Wizard finishes the set up course of, click on the “Start a new Android Studio” possibility to start improvement.
Android Command-line Tools
Other than Android Studio, there are different vital improvement instruments for Linux that you could be wish to set up. Particularly, command-line instruments that permit customers to work together with units on Linux. Fortunately, putting in these command-line instruments isn’t as tedious as Android Studio.
To get the Android command-line instruments engaged on Linux, observe the directions beneath that match your Linux OS.
Ubuntu
sudo apt set up android-tools
Debian
sudo apt-get set up android-tools
Arch Linux
sudo pacman -S android-tools
Fedora
sudo dnf set up android-tools -y
OpenSUSE
sudo zypper set up android-tools
Generic Linux
Want the Android command-line instruments however can’t discover them in your Linux distribution’s software program repository? Google has a standalone obtain for those who want it. Head over to the official download page, and scroll right down to “command line” to get it.