-->

install android studio on ubuntu with command line

install android studio on ubuntu
  • Android is an mobile operating system developed by Google.
  • First version of Android released on 23rd September 2008.
  • Android is an open source operating system.
  • Nowadays everyone is using android mobiles & android is providing cool and fantastic applications.
  • There are millions of android applications are out there on Google playstore.
  • There is a huge demand for android developers.
  • So don't waste time. Let's start developing cool android applications with extremely powerful and best operating system Ubuntu.
To install the android studio on Ubuntu follow below steps:
  1. Android Studio depends on Java, and Oracle. So, install it too.
    sudo add-apt-repository -y ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java7-installer oracle-java7-set-default
    
  2. Now, Add the Android Studio PPA & Install Android Studio
    sudo add-apt-repository ppa:paolorotolo/android-studio
    sudo apt-get update
    sudo apt-get install android-studio
    
  3.  You have successful installed Android Studio. Start android studio setup with below command.
    chmod +x /opt/android-studio/bin/studio.sh
    /opt/android-studio/bin/studio.sh
    
  4. After executing above commands it will open wizard & while it is installing it will download required files from Google. Do not change installation path.
  5. To setup android virtual device(AVD)  open studio and goto Tools >> Android >> AVD Manager.  It will show you list of virtual devices if available. If not create a virtual device by clicking create virtual device button. Now choose the device and create it.
  6.  Now, you can see directory named "Android" in you home directory.
  7. To setup Android path create a text file in home directory named ".bash_profile" and add below lines to it.
    export ANDROID_HOME=$HOME/Android/Sdk
    export PATH=$PATH:$ANDROID_HOME/tools
    export PATH=$PATH:$ANDROID_HOME/platform-tools
    
To open complete android studio run below command
/opt/android-studio/bin/studio.sh 
To use virtual devices only then follow below steps
  1. Change direcoty
    cd ~/Android/Sdk/tools/
  2. Find list of available virtual devices
    emulator -list-avds
    # Nexus_5X_API_23 (name of avd)
  3. Now, run below command to open virtual devise
    emulator -avd <AVD Name> # in my case avd names is Nexus_5X_API_23
It will open android emulator without opening android studio.

Buy a product to Support me