Install Android Studio on CentOS 7

9 Nov

Install Android Studio on CentOS 7

If you have installed CentOS7 on your computer, you can install android studio by just running two scripts. The scripts are given below. If you are not interested to install using the scripts, you can run the commands one by one.

For the installation you have to download jdk-8u101-linux-x64.rpm(for 64 bit) and android-studio-ide-145.3330264-linux.zip. JDK can be downloaded from the link http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.
Assumed that you installed 64 bit version of CentOS.

Android studio zip file can be downloaded from https://developer.android.com/studio/index.html.

Take your terminal and login as root. Move the downloaded files to your /opt folder. Then create step1.sh and step2.sh in your /opt folder. Run them as

#./step1.sh
#./step2.sh

step1.sh
#!/bin/bash
yum group install -y "Development Tools"
yum install -y glibc.i686
yum install -y libgcc_s.so.1
yum remove -y java
cd /opt
yum localinstall -y jdk-8u101-linux-x64.rpm

step2.sh
#!/bin/bash
cd /opt
unzip android-studio-ide-145.3330264-linux.zip
cd android-studio/bin
./studio.sh

Oracle JDK is required for Android, because of that we are removing Open JDK and installing Oracle JDK.

See http://stackoverflow.com/questions/35741439/can-android-studio-use-openjdk-or-does-it-require-oracle-jdk-on-linux for more information about that.

4 Comments

Leave a Reply

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