[android] How to install Android Studio on Ubuntu?

I have to install Android Studio on Ubuntu and I have used this link to download Android Studio.

Is there any easy way to install Studio on Ubuntu?

This question is related to android ubuntu android-studio

The answer is


To install android studio on ubuntu here is the simplest way possible:

First of all, you have to install Ubuntu Make before installing Android Studio. Type following commands in the same order one by one on terminal:

1) sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make

2) sudo apt-get update

3) sudo apt-get install ubuntu-make

Now since you are done with Ubuntu make, use below command to install Android Studio:

4) umake android

While installation it will give you a couple of option which you can handle. So, Installation is done. You can open it and run an App of your choice. Isn’t it very easy? Let me know if you go through any problem, I can help.

Source Install Android Studio


Don't forget to run:

/opt/android-studio/bin/studio.sh

when you are done installing.


Android Studio is now integrated in JetBrains Toolbox:

This free tool allows to easily install all JetBrains products, and Android Studio as well. Upgrade is automatic.

JetBrains toolbox

On Ubuntu, this tools requires FUSE (Filesystem in Userspace)


In order to install Android Studio on Ubuntu Studio 14.04 and derivatives, do the following:

Step 1: Open a terminal using the Dash or pressing Ctrl + Alt + T keys.

Step 2: If you have not, add that repository with the following command:

sudo add-apt-repository ppa:paolorotolo/android-studio

Step 3: Update the APT with the command:

sudo apt-get update

Step 4: Now install the program with the command:

sudo apt-get install android-studio

Step 5: Once installed, run the program by typing in Dash:

studio

Run the following command on terminal.

sudo apt-add-repository ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install android-studio

Here's how I installed android studio on xubuntu.

1. Install JDK:

Go through following commands to install jdk

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo apt-get install oracle-java7-set-default

If you want to install other version of jdk than replace your version number with 7 in last two commands.

2. Download the latest android studio from official site: https://developer.android.com/studio/index.html

It is better to use latest version of android studio because I tried to install version 1.5.1 and it was not working. Then I installed version 2.1.1 and it run perfectly.

  1. Extract downloaded android studio file in whichever folder you want. Now go to extracted android studio-->bin directory and open terminal here. Now run following:

    ./studio.sh

And that's it. If you are facing any problem than comment below.


You can also Install using a PPA link


Android Studio PPA is maintained by Paolo Rotolo. We just need to add PPA to our system and install it using the following commands:

$ sudo add-apt-repository ppa:paolorotolo/android-studio
$ sudo apt-get update
$ sudo apt-get install android-studio

For more, see allubuntu.com


Hi If you want to install android studio on ubuntu you shoudl first have Java JDk on ubuntu. Installing Java SDK

First you have to install Oracle on Java 7 (JDK and JRE)

Download Java SDK 32 or 64 bit depending upon your version.

java sdk on ubuntu

Then extract the file in the /tmp folder.Al dialogue box will pop up, click on replace all.An error will also pop out click close.

Go to tmp folder,a new folder name jdk and version must be created.right click on the folder and then click on rename and copy the name of the folder.

Also read How to Install Genymotion on Ubuntu First write this command and click enter.

install android sdk on ubuntu linux

sudo su

Then write this command and press enter

if [ ! -d '/usr/lib/jvm' ]; then mkdir /usr/lib/jvm; fi

Paste this command

mv /tmp/jdk1.8* /usr/lib/jvm/  

jdk1.8* = replace it with the name of the extracted folder in this example =jdk1.8.0_05

and press enter

sdk install linux

java,javac,jar,javaws = we have to replace these

update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8*/bin/java 1065
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8*/bin/javac 1065
update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.8*/bin/jar 1065
update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.8*/bin/javaws 1065
update-alternatives --config java
java -version

This was taken from http://emulatorforpc.com/best-android-emulator-ubuntu/


Below are the steps to install Android Studio in Ubuntu system:

1. Install JDK 6 or later

First, install Oracle JDK 8 (although you could also choose OpenJDK but it has some UI/performance issues) using WebUpd8 PPA.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

To make sure, it’s installed successfully, open a terminal and type (you should get the version number of the jdk you’ve installed e.g javac 1.8.0_11)

javac -version

2. Download and install Android Studio

Download the Android Studio package for Linux and extract it somewhere (e.g home directory). Then type :

cd android-studio/bin
./studio.sh

3. Install SDK Platforms

You need to install some SDK before you jump into building android apps. Click on Configure -> SDK Manager to open Android SDK Manager. Select the latest API (to test against target build, e.g API 19 (Android 4.4.2)) and some packages in Extras (Android Support Library and Android Support Repository). Then install the selected packages.


add a repository,

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

Then install using the command below:

sudo apt-get install android-studio

I was just investigating this issue now, you should use Ubuntu Make

Which "is a command line tool which allows you to download the latest version of popular developer tools on your installation"


The easiest method to install Android Studio (or any other developer tool) on Ubuntu is to use the snap package from Ubuntu Software store. No need to download Android Studio as zip, try to manually install it, add PPAs or fiddle with Java installation. The snap package bundles the latest Android Studio along with OpenJDK and all the necessary dependencies.

Step 1: Install Android Studio

Search "android studio" in Ubuntu Software, select the first entry that shows up and install it:

Search Android Studio on Ubuntu Software Android Studio on Ubuntu Software

Or if you prefer the command line way, run this in Terminal:

sudo snap install --classic android-studio

Step 2: Install Android SDK

Open the newly installed Android Studio from dashboard:

Android Studio app on Dash

Don't need to import anything if this is the first time you're installing it:

Import Dialog

The Setup Wizard'll guide you through installation:

Android Studio Setup Wizard

Select Standard install to get the latest SDK and Custom in-case you wanna change the SDK version or its install location. From here on, it's pretty straightforward, just click next-next and you'll have the SDK downloaded and installed.

Select Standard or Custom installation

Step 3: Setting PATHs (Optional)

This step might be useful if you want Android SDK's developer tool commands like adb, fastboot, aapt, etc available in Terminal. Might be needed by 3rd party dev platforms like React Native, Ionic, Cordova, etc and other tools too. For setting PATHs, edit your ~/.profile file:

gedit ~/.profile

and then add the following lines to it:

# Android SDK Tools PATH
export ANDROID_HOME=${HOME}/Android/Sdk
export PATH="${ANDROID_HOME}/tools:${PATH}"
export PATH="${ANDROID_HOME}/emulator:${PATH}"
export PATH="${ANDROID_HOME}/platform-tools:${PATH}"

If you changed SDK location at the end of Step 2, don't forget to change the line export ANDROID_HOME=${HOME}/Android/Sdk accordingly. Do a restart (or just logout and then log back in) for the PATHs to take effect.


Tested on Ubuntu 16.04LTS and above. Would work on 14.04LTS too if you install support for snap packages first.


Note: This question is similar to the AskUbuntu question "How to install Android Studio on Ubuntu?" and my answer equally applies. I'm reproducing my answer here to ensure a full complete answer exists rather than just a link.


I was having having an issue with umake being an outdated version. What fixed it was:

sudo apt remove --purge ubuntu-make
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt update
sudo apt install ubuntu-make
umake android

Follow the steps via terminal:

  1. sudo add-apt-repository ppa:webupd8team/java
  2. sudo apt-get update
  3. sudo apt-get install oracle-java8-installer

after then:

  1. sudo apt-get install oracle-java8-set-default

then;

  1. Download Android Studio from "https://developer.android.com/studio/index.html", use All Android Studio Packages.
  2. Unzip the file.

At last type via terminal :

  1. cd android-studio
  2. cd bin
  3. ./studio.sh

Then follow the commands and you're ready to go.


You could always follow the official guide on how to install Android Studio on Linux. There's even a video you can watch!

https://developer.android.com/studio/install.html

Remember to select Linux in the drop-down box.

Screenshot of video

To summarise the steps: download Android Studio and extract it and execute studio.sh to run it. If you're running 64-bit Ubuntu, you will need to run:

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

Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to ubuntu

grep's at sign caught as whitespace "E: Unable to locate package python-pip" on Ubuntu 18.04 How to Install pip for python 3.7 on Ubuntu 18? "Repository does not have a release file" error ping: google.com: Temporary failure in name resolution How to install JDK 11 under Ubuntu? How to upgrade Python version to 3.7? Issue in installing php7.2-mcrypt Install Qt on Ubuntu Failed to start mongod.service: Unit mongod.service not found

Examples related to android-studio

A failure occurred while executing com.android.build.gradle.internal.tasks "Failed to install the following Android SDK packages as some licences have not been accepted" error Android Gradle 5.0 Update:Cause: org.jetbrains.plugins.gradle.tooling.util This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()' Flutter plugin not installed error;. When running flutter doctor ADB.exe is obsolete and has serious performance problems Android design support library for API 28 (P) not working Flutter command not found How to find the path of Flutter SDK