Ubuntu under Android development environment

Source: Internet
Author: User

Reference Links:

http://blog.csdn.net/u013239111/article/details/35620745

Http://www.linuxidc.com/Linux/2014-05/101149.htm

1. Download the configuration JDK

: http://www.oracle.com/technetwork/java/javase/downloads/index.html,

Here you choose to download Java SE 7u67,linux 64-bit: jdk-7u67-linux-x64.tar.gz.

Go to the download directory and place the JDK package in the/opt/java directory:

Create file Java: $ sudo mkdir/opt/java

move jdk-7u67-linux-x64.tar.gz to/opt/java $ sudo mv jdk-7u67-linux-x64.tar.gz/opt/java/

Enter/opt/java: $ Cd/opt/java

Unzip the JDK to the current directory: $ sudo tar-zxvf jdk-7u67-linux-x64.tar.gz

Then is the configuration Java environment variable, generally we modify/etc/profile can: $ sudo gedit/etc/profile

Add four lines at the end of the file:

Export java_home=/opt/java/jdk1.7.0_55
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib
Export Path=${java_home}/bin: $PATH

Log off and re-login after saving to take effect (the Source/etc/profile command only makes the environment variable valid for the current shell).

There are 4 places to configure environment variables in Linux:

/etc/environment: Setting the entire system environment, regardless of the logged-on user

/etc/profile: Sets the environment information for each user of the system, and when the user first logs on, the file is executed and the shell's settings are collected from the configuration file in the/ETC/PROFILE.D directory

/ETC/BASH.BASHRC: Executes this file for each user running the bash shell. When the bash shell is opened, the file is read.

~/.BASHRC: This file contains bash information dedicated to the logged-on User bash shell, which is read when logging in and every time a new shell is opened. It can use these environment variables to control the permissions to the user level, if you need to give a user permissions to use these environment variables, you just need to modify their personal user home directory of the. bashrc file on it.

Effective time for each configuration:

/etc/environment: Restart effective

/etc/profile: Login takes effect after logout

/ETC/BASH.BASHRC: Re-opening bash shell takes effect

~/.BAHSRC: Re-opening bash shell takes effect

2. Install Eclipse

: http://www.eclipse.org/downloads/

Unzip (install) to/var/android/

3. Configuring ADT

Launch Eclipse, menu help, Install New software .... Available on the Select tab software

Click on the right button "Add", Pop Up the dialog box, set the following:

Name:adt Plugin (feel free to fill in)

location:http://dl-ssl.google.com/android/eclipse/

Click "OK" to return, click "Select All" after returning andclick "Next >" two times.

4. Set the SDK Path

After eclipse restarts, select Window > Preferences ..., in the Open Properties box, select Android, enter the directory of your Android SDK in the SDK location, Then press the apply button .

5. Because of the network problems, some things to Fq or download to the following website

Http://www.cnblogs.com/bjzhanghao/archive/2012/11/14/android-platform-sdk-download-mirror.html

Http://pan.baidu.com/s/1eQxhkR4

When I installed the virtual machine, I found that the Cpu/abi option is not lit, the Internet check is to install this stuff

Due to the speed problem, I went to http://www.cnblogs.com/bjzhanghao/archive/2012/11/14/android-platform-sdk-download-mirror.html

Under these files.

Unzip to

6. Test whether the virtual machine can be used

Run a just-built apk run--run configurations

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.