Install Android Studio on Ubuntu 14.04

To install Android Studio on Ubuntu 14.04, complete the following steps:

First, download the Android Studio here:

http://developer.android.com/sdk/index.html

 
The Android Studio requires Java’s JDK 6 or above (preferably 7), so you’ll want to do the following at your command line:

sudo apt-get install openjdk-7-jre
sudo apt-get install openjdk-7-jdk

 
Or, if you prefer to use the Android Studio recommended Oracle JDK, you can do the following:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

 
Notice that Ubuntu no longer provides the Oracle JDK as a default installation option, so we need to update our apt repositories to include the webupd8team/java location to retrieve the installer.

Next, go ahead and retrieve the Android Studio Zip file downloaded in the first step and place it in your preferred development location. For instance, we’ve put it in ~/projects/android/

Unzip the file and navigate to

android-studio/bin

 
Run the studio.sh file and complete the initial step to configure the studio.

If the setup guide indicates that you can take advantage of KVM (hardware virtualization), then you can run the following command to see if KVM is activated in your bios:

kvm-ok

 
It should say something like:

INFO: /dev/kvm exists
KVM acceleration can be used

 
If not, then you’ll want to close the setup guide and shutdown your computer to access your bios. Each motherboard is going to be different, but generally the configuration option is probably going to be found somewhere like along these lines (Advanced -> CPU Configuration -> Hardware Virtualization).

Once kvm-ok gives the success message above, you’re good to go and should follow these steps to get everything configured properly:

Intel HAMX instructions

 
The pertinent commands outlined in the link above are the following:

sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
sudo adduser your_user_name kvm
sudo adduser your_user_name libvirtd
#Verify Installation
sudo virsh -c qemu:///system list
#your screen will show ID  Name  State, if everything is successful.

 
At this point you can complete the Android Studio setup guide (android-studio/bin/studio.sh) and install some necessary SDK packages following these instructions:

http://developer.android.com/sdk/installing/adding-packages.html

 
Note that you can find your SDK location in the Android Studio under "Configure -> SDK Manager". Though, it is generally found in /home/user-name/Android/Sdk.

Happy programming.

Leave a Reply

Your email address will not be published. Required fields are marked *