Android development Environment (ADT, Android-studio) built on Ubuntu 12.04 (64-bit)

Source: Internet
Author: User

1. Ubuntu 12.04 64-bit

2. Download:

1) Oracel jdk:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

2) ADT bundle:http://developer.android.com/sdk/index.html

3) android-studio:http://developer.android.com/sdk/installing/studio.html

Install the configuration JDK:

$ sudo tar xzvf jdk-7u21-linux-x64.tar.gz-c/USR/LIB/JVM

$ CD/USR/LIB/JVM

$ sudo mv Jdk1.7.0_21/java-7-sun

Move the downloaded ADT and Android-studio to the following directory (the SDK randomly select one):

/usr/local/android directory: Android-studio Eclipse SDK

$ vim ~/.BASHRC

Add the following line at the end:

Export Android_home=/usr/local/android
Export SDK_HOME=${ANDROID_HOME}/SDK
Export Java_home=/usr/lib/jvm/java-7-sun
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib
Export path=${java_home}/bin:${android_home}/eclipse:${android_home}/android-studio/bin:${sdk_home}/ Platform-tools: $PATH

Perform:

$ source ~/.BASHRC

ADDED: Configuring the default JDK version
Since there may be default JDK in Ubuntu, such as OPENJDK, to set our installed JDK as the default JDK version, do the following

sudo update-alternatives--install/usr/bin/java Java/usr/lib/jvm/jdk7/bin/java 300
sudo update-alternatives--install/usr/bin/javac Javac/usr/lib/jvm/jdk7/bin/javac 300
sudo update-alternatives--install/usr/bin/jar Jar/usr/lib/jvm/jdk7/bin/jar 300

Perform
sudo update-alternatives--config java
(sudo update-alternatives--config javac)

The various JDK versions are listed as follows:

There are 3 candidates that can be used to replace Java (providing/usr/bin/java).


Select Path Priority state
------------------------------------------------------------
* 0/usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 Auto mode
1/usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 Manual Mode
2/usr/lib/jvm/java-6-sun/jre/bin/java 63 Manual Mode
3/usr/lib/jvm/jdk7/bin/java 300 Manual Mode


To maintain the current value [*] press ENTER, or type the number of your choice: 3
Update-alternatives: Using/usr/lib/jvm/jdk7/bin/java to provide/usr/bin/java (Java) in manual mode

At last:

$ sudo apt-get install Ia32-libs

Try out Eclipse and studio.sh

Reference: http://blog.csdn.net/yang_hui1986527/article/details/6677450

Original: http://blog.csdn.net/hanly_jiang/article/details/9123495

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.