简体   繁体   中英

Android Studio install ubuntu 12.04

I try to install android studio on ubuntu machine. I download android studio zip file from here . I run /android-studio/bin$ sh studio.sh command on terminal, it says that OpenJDK 6 is not supported. Please use Oracle Java or newer OpenJDK. OpenJDK 6 is not supported. Please use Oracle Java or newer OpenJDK. To fix this problem, I run sudo apt-get install openjdk-7-jre . But this way cannot solve my problem. What should I do?

try to install ORACLE JAVA 8 IN UBUNTU VIA PPA, this for ubuntu 15.04, 14.10, 14.04, 12.04 and 10.04

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

EDIT : This command will give you a list of alternative java options, which you will then be able select a JDK instead of JRE:

sudo update-alternatives --config java

first install java by using these commands.

wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz

sudo mkdir /opt/jdk

sudo tar -zxf jdk-8u25-linux-x64.tar.gz -C /opt/jdk

sudo update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_25/bin/java 100

sudo update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_25/bin/javac 100

now these steps will install Android studio

sudo add-apt-repository ppa:paolorotolo/android-studio
sudo apt-get update && sudo apt-get install android-studio
sudo /opt/android-studio/bin/studio.sh

this will do.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM