How to Install Android Studio in Ubuntu 14.04/14.10/12.04 via PPA

Last updated: February 28, 2016

Install Android Studio in Ubuntu

Quick tutorial shows you how to install Android Studio, a new Android development environment developed by Google and based on IntelliJ IDEA, via PPA in Ubuntu 14.10, Ubuntu 14.10, Ubuntu 12.04 and the next Ubuntu 15.04.

Similar to Eclipse with the ADT Plugin, Android Studio provides integrated Android developer tools for development and debugging.

On top of the capabilities you expect from IntelliJ, Android Studio offers:

  • Gradle-based build support.
  • Android-specific refactoring and quick fixes.
  • Lint tools to catch performance, usability, version compatibility and other problems.
  • ProGuard and app-signing capabilities.
  • Template-based wizards to create common Android designs and components.
  • A rich layout editor that allows you to drag-and-drop UI components, preview layouts on multiple screen configurations, and much more.
  • Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine as server-side components.

Install Android Studio via PPA in Ubuntu:

Installing Android Studio in Ubuntu becomes easy. A Ubuntu PPA contains simple script that automatically downloads and installs the latest release from Google download server. So far, Ubuntu 15.04, Ubuntu 14.10, Ubuntu 14.04, and Ubuntu 12.04 are supported.

1. Android Studio depends on Java, and Oracle Java 7 or 8 is recommended. Press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the commands below one by one:

sudo add-apt-repository -y ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java7-installer oracle-java7-set-default

2. To add the Android Studio PPA, run the command:

sudo apt-add-repository ppa:maarten-fonville/android-studio 

Then update package lists and install the script:

sudo apt-get update

sudo apt-get install android-studio

Depends on your internet connection, it takes a few minutes downloading the source package.

Once installed, start the setup wizard from the Unity Dash (may need restart), or just run command /opt/android-studio/bin/studio.sh.

via: github

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

24 responses to How to Install Android Studio in Ubuntu 14.04/14.10/12.04 via PPA

  1. Thank you!
    the android studio was not found or may be deleted on the launchpad servers :

    The requested URL /paolorotolo/android-studio/ubuntu/pool/main/a/android-studio/android-studio_4.2-0ubuntu0_all.deb was not found on this server.

  2. After running bin/studio.sh with sudo, I had to move the following directories to my user account from the root directory

    mv /root/Android /home/me;chown -R me.me /home/me/Android
    mv /root/.android /home/me;chown -R me.me /home/me/.android
    mv /root/.AndroidStudio /home/me;chown -R me.me /home/me/.AndroidStudio

  3. Wow! Thanks paolo for the PPA and educating me on how to use one. This great simplified my work endeavor.

  4. what version android studio?

    • i am using ubuntu 12.04 but i am having problem with the last command
      output of my terminal is
      *************************************************************************
      *hsh@ubuntu:~$ sudo apt-get install android-studio
      *Reading package lists… Done
      *Building dependency tree
      *Reading state information… Done
      *Some packages could not be installed. This may mean that you have
      *requested an impossible situation or if you are using the unstable
      *distribution that some required packages have not yet been created
      *or been moved out of Incoming.
      *The following information may help to resolve the situation:
      *
      *The following packages have unmet dependencies:
      * android-studio : Depends: lib32ncurses5 but it is not installable
      * Depends: libc6-i386 but it is not installable
      * Depends: lib32stdc++6 but it is not installable
      * Depends: lib32gcc1 but it is not installable
      * Depends: lib32z1 but it is not installable
      * Depends: lib32z1-dev but it is not installable
      *E: Unable to correct problems, you have held broken packages.
      *********************************************************************************
      please help me with this
      thanks

      • try sudo apt-get update and then sudo apt-get upgrade and then try installing android studio

        • same problem here, and the update/upgrade solution doesn’t solve the problem.

          • teniendo en cuenta que ya solucionaron su problema este comentario va para los que aun tienen ese problema:
            Lo que pasa es que android studio trabaja con una arquitectura de 64 bits, asi que solamente deben instalar algunas librerías extra en su sistema:

            sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6

            luego de esto recién seguir los pasos que recomienda este blog :)

  5. Hi,
    Thank you for this tutorial, I ty it on latest version of Ubuntu : it’s working.
    But now Oracle launch Java 8 and it’s possible to install latest vesion vith :
    sudo apt-get install oracle-java8-installer

  6. Hi I am a relatively new ubuntu user and installing android studio is giving me a headache for when i start the installation I get this “Unable to run mksdcard SDK tool.” when it tries to download components any advice please?

    • This is what fixed the issue for my 64bit system trying to run 32bit code, caused the mksdcard error.

      sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6

  7. install using debian package for android-studio

    sudo dpkg -i android-studio_4.8.3-ubuntu0_all.deb

  8. Thanks a lot it worked after a few trys for me

  9. Marcus Machado July 2, 2015 at 2:44 am

    it really works on ubuntu 14.04 just fine, I got my hyper-v server running stable version of trusty and it rocks! emulating with 4gb dedicated vram.
    :) standard… I am going to do the same task at work on an ubuntu machine 14.04 running gnome as graphics that reminds me of centOS :)
    neat

  10. Everything downloaded and worked perfectly fine until I try to run it and this error pops up:

    Gtk-Message: Failed to load module “unity-gtk-module”

    Can someone please help me?

  11. Hi..
    I had to install the ADT Bundle which includes the following 4 components:

    Eclipse IDE + ADT plugin
    Android SDK Tools
    Android Platform-tools
    The latest Android platform.

    But I followed your commands for andriod studio.
    what are the things I am yet to install for completing ADT bundle 4 components installation.

  12. shishir@shishir-HP-Pavilion-g6-Notebook-PC:~$ /opt/android-studio/bin/studio.sh
    java version “1.5.0”
    gij (GNU libgcj) version 4.9.2

    Copyright (C) 2007 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Start Failed: Internal error. Please report to https://code.google.com/p/android/issues

    java.lang.NoClassDefFoundError: com.intellij.util.lang.ClassPath
    at java.lang.Class.initializeClass(libgcj.so.15)
    at com.intellij.util.lang.UrlClassLoader.createClassPath(UrlClassLoader.java:179)
    at com.intellij.util.lang.UrlClassLoader.(UrlClassLoader.java:173)
    at com.intellij.util.lang.UrlClassLoader$Builder.get(UrlClassLoader.java:128)
    at com.intellij.ide.BootstrapClassLoaderUtil.initClassLoader(BootstrapClassLoaderUtil.java:68)
    at com.intellij.ide.Bootstrap.main(Bootstrap.java:32)
    at com.intellij.idea.Main.main(Main.java:83)
    Caused by: java.lang.ClassNotFoundException: sun.misc.Resource not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/opt/android-studio/bin/../lib/bootstrap.jar,file:/opt/android-studio/bin/../lib/extensions.jar,file:/opt/android-studio/bin/../lib/util.jar,file:/opt/android-studio/bin/../lib/jdom.jar,file:/opt/android-studio/bin/../lib/log4j.jar,file:/opt/android-studio/bin/../lib/trove4j.jar,file:/opt/android-studio/bin/../lib/jna.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
    at java.net.URLClassLoader.findClass(libgcj.so.15)
    at java.lang.ClassLoader.loadClass(libgcj.so.15)
    at java.lang.ClassLoader.loadClass(libgcj.so.15)
    at java.lang.Class.forName(libgcj.so.15)
    at java.lang.Class.initializeClass(libgcj.so.15)
    …6 more

    Also, an UI exception occurred on attempt to show above message:
    java.lang.NoClassDefFoundError: javax.swing.UIManager
    at java.lang.Class.initializeClass(libgcj.so.15)
    at javax.swing.UIManager.getUI(libgcj.so.15)
    at javax.swing.text.JTextComponent.updateUI(libgcj.so.15)
    at javax.swing.text.JTextComponent.(libgcj.so.15)
    at javax.swing.JEditorPane.(libgcj.so.15)
    at javax.swing.JTextPane.(libgcj.so.15)
    at com.intellij.idea.Main.showMessage(Main.java:231)
    at com.intellij.idea.Main.showMessage(Main.java:217)
    at com.intellij.idea.Main.main(Main.java:86)

  13. thanks for the guide. it installed very well on ubuntu 15.04 linux..
    these guides have helped mi so much……………

  14. i am a beginner for ubuntu,i downloaded Android Studio direct from web,i installed it finally one problem ,when i run android studio ADB manually kill,then restart.this error repeated, i kill adb using terimanal command,but no working..

    how to solve this problem??

  15. hi
    i install android studio only i dont open studio by command /opt/android-studio/bin/studio.sh
    please help me

  16. Better check out https://mfonville.github.io/android-studio/ for an up to date Android Studio PPA