How to install Android Studio on Ubuntu? - android

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?

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.

Download the Linux SDK from the Android website.
Copy the folder to whereever you want to extract the contents.
Open a terminal there, and then run:
sudo apt-get install unzip
sudo tar xvzf android-studio-ide-135.1641136-linux.zip
cd android-studio-ide-135.1641136-linux
./studio.sh
JDK 1.7 is required for Studio 1.0 onwards:
Download the ubuntu zip from the d.android.com and repeat the steps from above
Download the jdk 1.7 by executing the following commands in terminal as mentioned webupd8:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Open Android Studio and install the SDK tools.
Caveats:
If your system has a 32 bit processor, use Platform Tools r23.0.1.
Refer to this bug for details.
Note: If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:
$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1
Source: - linux-32-bit-libraries

Run the following command on terminal.
sudo apt-add-repository ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install android-studio

Don't forget to run:
/opt/android-studio/bin/studio.sh
when you are done installing.

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:
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:
Don't need to import anything if this is the first time you're installing it:
The Setup Wizard'll guide you through installation:
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.
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.

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.
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

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

you can install android studio by following steps in the terminal :
sudo apt update
sudo apt install openjdk-8-jre
sudo add-apt-repository ppa:maarten-fonville/android-studio
sudo apt update
sudo apt install android-studio
make sure you have no error in installation.

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

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

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

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.
On Ubuntu, this tools requires FUSE (Filesystem in Userspace)

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/

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"

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.
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

Follow the steps via terminal:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
after then:
sudo apt-get install oracle-java8-set-default
then;
Download Android Studio from "https://developer.android.com/studio/index.html", use All Android Studio Packages.
Unzip the file.
At last type via terminal :
cd android-studio
cd bin
./studio.sh
Then follow the commands and you're ready to go.

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

Related

installing android studio on ubuntu

everybody, I am the android developer, I am using ubuntu 14.04 LTS.
Because of some hardware problem, I have to format my PC. before that android studio , SDK and Java were working perfectly.
After formatting my PC. I installed jdk1.8.0_71. after i extract android studio deb file with command sudo dpkg -i android-studio_4.13.0-ubuntu0_all.deb
and 'android-studio' folder extracted at /opt directory.
after that, i try to run /opt/android-studio/bin/studio.sh with command.
sh ./studio.sh and it gives me error like this
I have also tried by ./studio.sh to execute but same error. please help to solve.
To install Oracle Java on Ubuntu, do this:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
I do this every time I install an Android Studio and it works flawlessly. And your Java 8 will be kept up to date, too. The environment variables are automatically properly set by that procedure.
its all about ELF execution (when you get bushes in output)
when your 64 bit os tries to start the Android SDK which in turns tries to run some 32 bit binaries and thus is the issue of compatibility.
check you have proper libs installed for studio
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
64-bit architecture your you need
sudo apt-get install libncurses5:amd64 libstdc++6:amd64 zlib1g:amd64
and 32 bit:
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386
for details see:
https://developer.android.com/studio/install.html
ps if apt could not find such libs try to search for similar - the name can vary for different distro
also use proper java hotspot (jdk) 32/64bit for your system
Setting up Android Studio takes just a few clicks.
While the Android Studio download completes, verify which version of the JDK you have: open a command line and type javac -version. If the JDK is not available or the version is lower than 1.8, download the Java SE Development Kit 8.
To install Android Studio on Linux, proceed as follows:
Unpack the .zip file you downloaded to an appropriate location for your applications, such as within /usr/local/ for your user profile, or /opt/ for shared users.
To launch Android Studio, open a terminal, navigate to the android-studio/bin/ directory, and execute studio.sh.
Tip: Add android-studio/bin/ to your PATH environment variable so you can start Android Studio from any directory.
Select whether you want to import previous Android Studio settings or not, then click OK.
The Android Studio Setup Wizard guides you though the rest of the setup, which includes downloading Android SDK components that are required for development.
Note: If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
If you are running 64-bit Fedora, the command is:
sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686
For your details:
https://storage.googleapis.com/androiddevelopers/videos/studio-install-linux.mp4
I had similar problems with finding java by starting android-studio on ubuntu.
I solved the problems by editing the studio.sh file.
In the file the JAVA_HOME variable should be set, but it wasn't.
So I set the JAVA_HOME variable in the script manually and I could start android-studio.
Finally i solved my problem bu reinstalling java properly. i thought i installed wrong java/jdk. now Android Studio,Java is working.
I found this link useful to install java step by step. Link to install java step by step
Install Android Studio in ubuntu :
At first install JDK
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
Download the android studio from here
https://developer.android.com/studio
Unzip android studio tar file using :
sudo unzip android-studio-ide-141.2178183-linux.zip -d /opt
or Simply unzip the download file using Archive Manager
Goto to android-studio/bin folder and open terminal or in terminal type
/opt/android-studio/bin
Then type :
./studio.sh
Android studio lunch your computer.
It takes about 30 min to one hour to finish gradle.
There recommend some updates and you should provide those updates.
For installing app using your phone, open developer mode. If you cannot see developer options go to about phone and tap build version 8 times.
In developer options turn on usb debugging.
Connect the phone into the computer using a USB cable.
Give a commands : sudo apt install adb
On the phone there is a dialog for debugging permission. Provide the permission.
Then install the app.
For saw the program in desktop goto tools->Create Desktop Entry-> Ok
Please, try to install java 7 or openjdk. It must solve problem.

How to install Android sdk to Ubuntu 14.04?

I had download Android zip file from the web site developer.android.com
And I try to install like following command in Terminal.
#cd desktop/android-sdk/tools/
#./studio.sh
After this system shows the window with title Android SDK Manager
Is it the proper procedure to install?
You can use apt-get to install , its easier.
1st) Download the repository
sudo add-apt-repository ppa:paolorotolo/android-studio
2nd) Update
sudo apt-get update
3rd) install
sudo apt-get install android-studio
this will install a old version , you just have to update .
If you plan to run adb command you have to set the path on your .bashrc "OR" .profile.
export ANDROID_HOME=~/Android/Sdk
PATH=\$PATH:\$ANDROID_HOME:\$ANDROID_HOME/tools:\$ANDROID_HOME/platform-tools
export PATH
you can create a desktop entry form Android Studio , in case you don't find how to create you can create by creating a file:
/usr/share/applications/android-studio.desktop
inside this file add this lines
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name=Android Studio
Exec=/opt/android-studio/bin/studio.sh
Comment=Integrated Android developer tools for development and debugging.
Icon=androidstudio
Categories=GNOME;GTK;Development;IDE;
i create a script to do all this job but unfortunately i cant send it here.
PS: make sure you have the JAVA_HOME set .
How to install Android Studio in Ubuntu
Duplicate Question is why you are being voted down a simple google search of
android studio on ubuntu 14.04 top result is a referenced question that is protected here
Setting up Android Studio takes just a few clicks.
While the Android Studio download completes, verify which version of the JDK you have: open a command line and type javac -version. If the JDK is not available or the version is lower than 1.8, download the Java SE Development Kit 8.
To install Android Studio on Linux, proceed as follows:
Unpack the .zip file you downloaded to an appropriate location for
your applications, such as within /usr/local/ for your user profile,
or /opt/ for shared users.
To launch Android Studio, open a terminal, navigate to the
android-studio/bin/ directory, and execute studio.sh. Tip: Add
android-studio/bin/ to your PATH environment variable so you can
start Android Studio from any directory.
Select whether you want to import previous Android Studio settings
or not, then click OK.
The Android Studio Setup Wizard guides you though the rest of the
setup, which includes downloading Android SDK components that are
required for development.
Note: If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
If you are running 64-bit Fedora, the command is:
sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686
Find the Instructions for install Android Studio for Linux from this link
All the information is there, yet feel free to ask anything.

How to install Android SDK on Ubuntu?

For my Ubuntu machine, I downloaded the latest version of Android SDK from this page.
After extracting the downloaded .tgz file, I was trying to search for installation instructions and found:
To get started on Linux:
Unpack the .zip file you've downloaded. The SDK files are download separately to a user-specified directory.
Make a note of the name and location of the SDK directory on your system—you will need to refer to the SDK directory later when using the SDK tools from the command line.
What exactly are we supposed to do?
Option 1:
sudo apt update && sudo apt install android-sdk
The location of Android SDK on Linux can be any of the following:
/home/AccountName/Android/Sdk
/usr/lib/android-sdk
/Library/Android/sdk/
/Users/[USER]/Library/Android/sdk
Option 2:
Download the Android Studio.
Extract downloaded .zip file.
The extracted folder name will read somewhat like android-studio
To keep navigation easy, move this folder to Home directory.
After moving, copy the moved folder by right clicking it. This action will place folder's location to clipboard.
Use Ctrl Alt T to open a terminal
Go to this folder's directory using cd /home/(USER NAME)/android-studio/bin/
Type this command to make studio.sh executable: chmod +x studio.sh
Type ./studio.sh
A pop up will be shown asking for installation settings. In my particular case, it is a fresh install so I'll go with selecting I do not have a previous version of Studio or I do not want to import my settings.
If you choose to import settings anyway, you may need to close any old project which is opened in order to get a working Android SDK.
From now onwards, setup wizard will guide you.
Android Studio can work with both Open JDK and Oracle's JDK (recommended). Incase, Open JDK is installed the wizard will recommend installing Oracle Java JDK because some UI and performance issues are reported while using OpenJDK.
The downside with Oracle's JDK is that it won't update with the rest of your system like OpenJDK will.
The wizard may also prompt about the input problems with IDEA .
Select install type
Verify installation settings
An emulator can also be configured as needed.
The wizard will start downloading the necessary SDK tools
The wizard may also show an error about Linux 32 Bit Libraries, which can be solved by using the below command:
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1
After this, all the required components will be downloaded and installed automatically.
After everything is upto the mark, just click finish
To make a Desktop icon, go to 'Configure' and then click 'Create Desktop Entry'
source
To install it on a Debian based system simply do
# Install latest JDK
sudo apt install default-jdk
# get latest sdk tools - link will change. go to https://developer.android.com/studio/#downloads and look for "Command line tools only" download from webpage as you will need to accept terms. Then extract.
mkdir cmdline-tools
mv <folder-you-extracted> android-sdk/cmdline-tools
# So after this step is done you will have ~/cmdline-tools/tools with bin/ and lib/ in it.
Then add the Android SDK to your PATH, open ~/.bashrc in editor and add the following lines into the file
# Export the Android SDK path
export ANDROID_HOME=$HOME/cmdline-tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
Run
source ~/.bashrc
Show all available sdk packages
sdkmanager --list
Identify latest android platform (here it's 33) and run
sdkmanager "platform-tools" "platforms;android-33"
Now you have adb, fastboot and the latest sdk tools installed
Android SDK Manager
sudo snap install androidsdk
Usage
You can use the sdkmanager to perform the following tasks.
List installed and available packages
androidsdk --list [options]
Install packages
androidsdk packages [options]
The packages argument is an SDK-style path as shown with the --list command, wrapped in quotes (for example, "build-tools;29.0.0" or "platforms;android-28"). You can pass multiple package paths, separated with a space, but they must each be wrapped in their own set of quotes.
For example, here's how to install the latest platform tools (which includes adb and fastboot) and the SDK tools for API level 28:
androidsdk "platform-tools" "platforms;android-28"
Alternatively, you can pass a text file that specifies all packages:
androidsdk --package_file=package_file [options]
The package_file argument is the location of a text file in which each line is an SDK-style path of a package to install (without quotes).
To uninstall, simply add the --uninstall flag:
androidsdk --uninstall packages [options]
androidsdk --uninstall --package_file=package_file [options]
Update all installed packages
androidsdk --update [options]
Note
androidsdk it is snap wraper of sdkmanager
all options of sdkmanager work with androidsdk
Location of installed android sdk files : /home/user/AndroidSDK
See all sdkmanager options in google documentation
UPDATE: This method is no longer recommended and installation is as easy as downloading it from the official website, then running the downloaded binary.
ORIGINAL ANSWER:
There is no need to download any binaries or files or follow difficult installation instructions.
All you really needed to do is:
sudo apt update && sudo apt install android-sdk
Update: Ubuntu 18.04 only
I can tell you the steps for installing purely via command line from scratch.
I tested it on Ubuntu on 22 Feb 2021.
create sdk folder
export ANDROID_SDK_ROOT=/usr/lib/android-sdk
sudo mkdir -p $ANDROID_SDK_ROOT
install openjdk
sudo apt-get install openjdk-8-jdk
download android sdk
Go to https://developer.android.com/studio/index.html
Then down to Command line tools only
Click on Linux link, accept the agreement and instead of downloading right click and copy link address
cd $ANDROID_SDK_ROOT
sudo wget https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip
sudo unzip commandlinetools-linux-6858069_latest.zip
move folders
Rename the unpacked directory from cmdline-tools to tools,
and place it under $ANDROID_SDK_ROOT/cmdline-tools,
so now it should look like: $ANDROID_SDK_ROOT/cmdline-tools/tools.
And inside it, you should have: NOTICE.txt bin lib source.properties.
set path
PATH=$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$ANDROID_SDK_ROOT/cmdline-tools/tools/bin
This had no effect for me, hence the next step
browse to sdkmanager
cd $ANDROID_SDK_ROOT/cmdline-tools/tools/bin
accept licenses
yes | sudo sdkmanager --licenses
create build
Finally, run this inside your project
chmod 777 gradlew
sudo ./gradlew assembleDebug
This creates an APK named -debug.apk at //build/outputs/apk/debug
The file is already signed with the debug key and aligned with zipalign,
so you can immediately install it on a device.
REFERENCES
https://gist.github.com/guipmourao/3e7edc951b043f6de30ca15a5cc2be40
Android Command line tools sdkmanager always shows: Warning: Could not create settings
"Failed to install the following Android SDK packages as some licences have not been accepted" error
https://developer.android.com/studio/build/building-cmdline#sign_cmdline
If you are on Ubuntu 17.04 (Zesty), and you literally just need the SDK (no Android Studio), you can install it like on Debian:
sudo apt install android-sdk android-sdk-platform-23
export ANDROID_HOME=/usr/lib/android-sdk
In build.gradle, change compileSdkVersion to 23 and buildToolsVersion to 24.0.0
run gradle build
install the android SDK for me was not the problem, having the right JRE and JDK was the problem.
To solve this install the JVM 8 (the last fully compatible, for now):
sudo apt-get install openjdk-8-jre
Next use update-alternative to switch to the jre-8 version:
sudo update-alternatives --config java
You can revert JVM version when you want with the same update-alternatives command
Note that you problably have to do the same after this with javac also (now you have only java command at version 8)
first do:
sudo apt-get install openjdk-8-jdk
next:
sudo update-alternatives --config javac
After this you can install android SDK that require this specific Java version
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer oracle-java7-set-default
wget https://dl.google.com/dl/android/studio/ide-zips/2.2.0.12/android-studio-ide-145.3276617-linux.zip
unzip android-studio-ide-145.3276617-linux.zip
cd android-studio/bin
./studio.sh
Install Android Studio with
sudo snap install android-studio --classic
when you open it for the first time it will install the SDK for you (with options) .

I am unable to install Android Studio on Linux mint 17.1

I have tried for a lot times, but failed.
The Problem Details: I used these commands
sudo apt-add-repository ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install android-studio
When i command the first line into the terminal it didn't notice me to getting any error. But after commanding the second line it got error..
There is the screenshot of that Error ...
The official distribution of Android Studio can be downloaded here. You're trying to use an unofficial repository maintained by someone from the community; there is absolutely no guarantee that it's going to work. Please consider downloading the official distribution instead.
So, first you want to make sure your Java is properly installed. You can do this manually or with a PPA.
Manual Method:
Get rid of the Open JDK that may be installed:
sudo apt-get update && apt-get remove openjdk*
Download Oracle JDK from here. You are looking for a linux version
with tar.gz extension. Also choose the right version from 32-bit
(x86) and 64bit (x64) one.
sudo mkdir -p /opt/java
Move the unzipped download to where it will live (I put the version
number in this example):
sudo mv jdk1.8.0_91 /opt/java
Make this JDK your system's default:
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.8.0_91/bin/java" 1
sudo update-alternatives --set java /opt/java/jdk1.8.0_91/bin/java
Finally, test your Java version:
java -version
PPA Method:
Get rid of the Open JDK that may be installed:
sudo apt-get update && apt-get remove openjdk*
ADD PPA
sudo add-apt-repository ppa:webupd8team/java
UPDATE
sudo apt-get update
INSTALL
sudo apt-get install oracle-java8-installer
Now Install Android Studio - either manually or via PPA:
Manual Method:
Download android studio:
Get it from http://developer.android.com/sdk/installing/studio.html#download then untar it under /opt/android-studio (recommended).
Launch it!
run ./studio.sh in the /opt/android-studio/bin directory. This will launch the setup and download all the SDKs and other necessary files on your first run, and this is what you will do to launch in the future. Just make a shortcut :)
PPA Method:
ADD PPA
sudo add-apt-repository ppa:paolorotolo/android-studio
UPDATE
sudo apt-get update
INSTALL
sudo apt-get install android-studio
NOTE: This PPA is maintained by Google, not just "someone from the community"

How to install Android studio in Ubuntu?

I am new in Android Studio and i am trying to install it in Ubuntu. I used these commands one after another.
sudo apt-add-repository ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install android-studio
it installed correctly, but i am not able to start the Studio. How can i start it? Please help, Thanks
Just download the zip file from
http://developer.android.com/sdk/index.html
extract and run studio.sh
sudo apt-add-repository ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install android-studio
if all done
step1: find studio.sh file like this:location:/computer/opt/abdriud-studio/bin/studio.sh
**step2:**open terminal(CTRL+ALT+T) write down command and enter
follow this steps
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:
open the terminal Ctrl+Alt+T
step1:
sudo apt update
sudo apt install android-sdk
step2:go to the browser Download the software from Android Studio
after extract the Android studio.tar.gz file
step3: Go to this folder's directory using cd /home/(USER NAME)/android-studio/bin/
example:cd /home/pr4v33n/Downloads/android-studio/bin/
step4:Type this command to make studio.sh executable:
chmod +x studio.sh
step5: type the command ./studio.sh
step6:A pop up will be shown asking for installation pop up will be shown asking for installation settings. In my particular case, it is a fresh install so I'll go with selecting I do not have a previous version of Studio or I do not want to import my settings.
step7:after select the standard setup android studio version
step8:start the project

Categories

Resources