Last updated: Sunday 30th August 2015, 7:19 PT, AD

Android Studio Installation on Ubuntu Linux

At the time of writing (Sat 29th August 2015), 
Android Studio is the Google recommended development tool for Android apps. 

Follow the instructions here for installation:
Android Studio Installation

I downloaded the Linux .zip file, extracted it to:
new directory AndroidStudio
/home/anne/Desktop

To run Android Studio:

# /home/anne/Desktop/AndroidStudio/android-studio/bin/studio.sh

I got this error:
JAVA_HOME error


You need to ensure JAVA_HOME is added to environment variables, 
and gives the correct path to the Java jdk:

# cd /usr/lib/jvm
# ls
# java-7-openjdk-amd64


Edit /etc/environment and add 
JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64 
to the end of the file.

*** NOTE: Android Studio will not run with java-1.6.0-openjdk-amd64 ***
*** I got an error message saying OpenJDK 6 is not supported ***
*** and a request to install a newer version ***

In my case I uninstalled java-1.6.0-openjdk-amd64 using Synaptic Package Manager, 
then installed java-1.7.0-openjdk-amd64.

Check your javac version to ensure it is at least version 7 or above:

#  javac -version
javac 1.7.0_79

Then, to install and run Android Studio:

# /home/anne/Desktop/AndroidStudio/android-studio/bin/studio.sh

The installation starts.

When you get to this screen:
Android Studio Emulator

I followed the link and found:
How to install KVM and virtual machines on Ubuntu

Part way down I read this:

"Run this command after logging back in and you should see 
an empty list of virtual machines. 
This indicates that everything is working correctly...

virsh -c qemu:///system list

anne@Inspiron-15R:~$ virsh -c qemu:///system list
 Id    Name                           State
----------------------------------------------------

anne@Inspiron-15R:~$ 

So it looks like KVM is already set up on my system, 
probably from the previous 
Android Development system installed.

Since Virt-Manager was used in the reference above to create virtual machines,
in case I need it later, 
I also installed Virt-Manager through Synaptic Package Manager:

Virt-Manager

Then after continuing with the Android Studio installation,
I get this screen:

Android Studio Installation Downloading Components

and
the final installation screen looks like this:

_________________________________________________________

Setup type:
Standard

Destination Folder:
/home/anne/android/adt-bundle-linux-x86_64-20130917/sdk

Total Download Size:
820 MB

Sdk Components to Download:
Android SDK Build-tools, revision 23.0.0	37.3 MB
Android SDK Platform-tools, revision 23.0.0	2.38 MB
Android SDK Tools, revision 24.3.4	  	295 MB
Android Support Repository, revision 17	  	102 MB
Google APIs Intel x86 Atom System Image, Google Inc. API 23, revision 7	  	331 MB
Google APIs, Android API 23, revision 1	  	176 KB
Google Repository, revision 21	  		51.6 MB
​--------------------------------------------------------------------------

​When it is installed and you get to the "Welcome to Android Studio" screen, 
at the bottom of that screen is a Check for updates link 
which I clicked to get the latest version. 

The installation was quick and clean.

Android Studio Welcome Screen

TO COMPLETE THE INSTALLATION THERE IS ONE LAST STEP:

Following the instructions at the bottom of the page here:
Android Studio Installation

"Android Studio is now ready and loaded with the Android developer tools,
but there are still a couple packages you should add to make your Android SDK complete."

Adding SDK Packages

Firstly from the Android Studio Welcome screen 
I created a new Android project accepting all defaults.
Then click on SDK Manager from the toolbar:

Android Studio SDK Manager

Following instructions here:
Adding SDK Packages

Android Studio SDK Tools

I found the SDK tools were already installed,
but I also installed, as suggested in the link, 
Android Support Repository and Library and Google Repository. 

I also went to the SDK Platforms tab 
and installed Android 6.0 (Marshmallow) 
the latest API at the time of writing (Sunday 30th August 2015),
and Android 5.1.1 (Lollipop) - 
at the time of writing the OS installed on my Nexus 5 phone.





Sponsors:





























Valid HTML5!

Valid CSS!