This post is an addendum to installing Ubuntu, if you are missing any packages, please see the Essentials section in that post. Let’s get cracking!
Not absolutely necessary, but I prefer to use the default JDK:
sudo apt install default-jdk default-jre
The Android Emulator runs faster when virtualization software is used. Before proceeding, please make sure virtualization is enabled in your BIOS. Let’s verify if your CPU is supported:
sudo apt install cpu-checker egrep -c '(vmx|svm)' /proc/cpuinfo
if the result is 0 then virtualization is not supported, skip to the next section.
The output should indicate that KVM acceleration can be used, if not skip to the next section.
Let’s configure virtualization as per this recommendation.
sudo apt install qemu qemu-kvm libvirt-clients libvirt-daemon libvirt-daemon-system virtinst bridge-utils sudo systemctl enable --now libvirtd sudo systemctl status libvirtd
Add the current user to the KVM group:
sudo adduser $USER kvm sudo reboot
Install Android Studio
Download the tar file from here.
I have a folder called Apps where I install software. I’ll change into that folder to begin the install:
cd ~\Apps tar -xzf ~/Downloads/android-studio-ide-201.6953283-linux.tar.gz cd android-studio/bin ./studio.sh
Follow the prompts to complete your install. I typically select to use the version of the JDK we installed earlier, found at this location:
Post Installation Configuration
I like to use Sdk 28 for Flutter, so I install that from the SDK Manager available form the configuration drop down menu.
I also install the Command Line Tools.
Remember to create a desktop shortcut from the configuration menu’s Create Desktop Entry item.
Lastly, a few tweaks to the environment so everything runs smoothly.
sudo vim ~/.bashrc
Add this to the end of your bashrc file:
Now you can create an device using AVD, perhaps called nexus, and start it from the console:
emulator @nexus &