Ubuntu on Windows: Install Java 8 and Android Studio 4 + NDK

👍1. Install Java 8

homanadmin@LAPTOP-THUV2CQ5:~$ java -versionCommand 'java' not found, but can be installed with:sudo apt install default-jre              # version 2:1.11-72, or
sudo apt install openjdk-11-jre-headless # version 11.0.7+10-3ubuntu1
sudo apt install openjdk-13-jre-headless # version 13.0.3+3-1ubuntu2
sudo apt install openjdk-14-jre-headless # version 14.0.1+7-1ubuntu1
sudo apt install openjdk-8-jre-headless # version 8u252-b09-1ubuntu1
sudo apt-get install openjdk-8-jdk
homanadmin@LAPTOP-THUV2CQ5:~$ java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1ubuntu1-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

find /usr/lib -path ‘*java’

$ find /usr/lib -path '*java'
$ cat >> /etc/environment <<EOL
> JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
> JRE_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
bash: /etc/environment: Permission denied
$ sudo nano /etc/environment
[sudo] password for homanadmin:
homanadmin@LAPTOP-THUV2CQ5:~$ cat /etc/environment

🖖🏻2. Install Android Studio

$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit

All of the private applications will go to /usr/local folder.

sudo mv android-studio /usr/local
~/Downloads$ cd /usr/local
/usr/local$ ll
total 48
drwxr-xr-x 12 root root 4096 Jun 23 11:04 ./
drwxr-xr-x 14 root root 4096 Apr 22 23:41 ../
drwxrwxr-x 7 homanadmin homanadmin 4096 May 20 09:36 android-studio/

Create Launcher…

👀3. Add NDK r21!

See ya!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store