Installing Java 8 and Android Studio on Ubuntu 18.04
Throughout this tutorial, we'll see how to install Java 8 and Android Studio on either Ubuntu 18.04.
Android Studio by Google is the official IDE for building Android mobile applications so before you can do any Android mobile development you need to have a development machine ready with Java 8 and Android installed.
Android Studio has the best and fastest tools for building apps for each type of Android devices.
Android Studio has many features such as:
- Visual layout editor which can be used to build complex layouts visually and generates code with
- Intelligent code editor which helps developers completing code for Java, Kotlin and C/C++.
- Fast emulator for quickly running and testing Android applications.
Installing Java 8 on Ubuntu 18.04
Java 8 is required for developing Android applications and as such you need to install Java first. You have many choices for Java:
- The official Oracle Java
- The open source version of Java -- OpenJDK
Let's install the Oracle Java using a PPA by running the following commands:
First start by adding the PPA:
sudo add-apt-repository ppa:webupd8team/java
Next, you'll need to update the cache using:
sudo apt-get update
oracle-java8-installer packages using the following command:
sudo apt-get install java-common oracle-java8-installer
When installing these packages you will be prompted to accept the Oracle License agreement. You need to accept it for the installation to complete.
You should get this message: *Oracle JDK 8 installed *.
After installing Oracle Java, you need to setup the
JAVA_HOME environment variable which should point to where Java is installed.
To set Oracle JDK8 as default, install the "oracle-java8-set-default" package by running the following command:
sudo apt-get install oracle-java8-set-default
You can then either re-open a new terminal or run
source /etc/profile in your current terminal to activate the new environment variables.
Installing Android Studio in Ubuntu 18.04
After installing Oracle Java and set it as the default in Ubuntu. You can now install Android Studio by either going to the official website and downloading the ZIP package for Linux 32bit or 64bit. Or install Android Studio from a PPA which is the preferred method that I'm going to show you in this tutorial.
So go ahead and start by adding the PPA ppa:maarten-fonville/android-studio
sudo add-apt-repository ppa:maarten-fonville/android-studio
Next run the update command:
sudo apt update
Finally, install Android Studio by running the following command:
sudo apt install android-studio
This will take some time to download Android Studio and install it.
After installing Android Studio, you can access it from Unity Dash.
In this tutorial, we've seen how to setup a development environment with Java 8 and Android Studio in Ubuntu 18.04 which are required for developing Android applications.
- Django 2 Ajax CRUD with Python 3.7 and jQuery
- PHP 7 Tutorial with MySQL: CRUD REST API & JWT
- Django 2 CRUD Tutorial: Generic Class-Based Views
- Angular 6|7 Tutorial — CRUD & Python REST API
- Python 3.7 Matplotlib — Data Visualization Tutorial
- Python 3.7 Data Classes — Tutorial by Example
- Ember 3 Tutorial: Building your First Application
- Django Authentication — Login, Logout and Password Change/Reset
- Ubuntu 18.04: Install Python 3.7 | 3.6, pip and venv
- Vertical Center in Bootstrap 4
- Angular 6|7 ngIf by Example
- Angular 6|7 ngFor Example
- JWT Auth with Vue, Vuex and Vue Router — Axios & Guards
- Node Express JWT Authentication — jsonwebtoken and bcryptjs
- Python Django JWT — djangorestframework-jwt Example
- Adonis Tutorial — CRUD REST API and JWT Authentication
- Adonis Tutorial — JWT Authentication
- Installing PostgreSQL on Ubuntu 18.04
- PostgreSQL & PostGIS Tutorial — Creating a Spatial Database
- Installing GDAL 2+ on Windows 7 & Windows 10
- Swift Vapor Tutorial — Creating a REST API
- es6 template strings or literals
- Django Form Example—Bootstrap 4 UI via django-crispy-forms
- Django TemplateView GET|POST Example — URLs, as_view and get_context_data
- CSS Grid Layout Tutorial—Styling a Django Template
- Vuex Tutorial
- Redux Tutorial
- Angular 7|6 with PHP and MySQL Example & Tutorial
- Ethereum Dapps with Truffle,Ganache, Metamask, OppenZippelin and React
- Angular 7|6 In-Memory Web API Tutorial | CRUD Example
- Using Vue.js in WordPress
- Learn Sails.js Tutorial 
- Using Vue.js in PHP Tutorial
- Angular 7|6 Material Data-Table Tutorial & Example