Build an android development environment in centos

Source: Internet
Author: User

JDK Installation
No centos built-in Java environment, download the latest version of Oracle Java, for the http://www.oracle.com/technetwork/ja...sp-136632.html
Directly download, go to the page and select Linux download in platform. I didn't register it. Click continue to go to the next page and select the type of the package you want to download.
Jdk-6u21-linux-i586-rpm.bin network speed faster, then it will be finished.
Modify executable permissions after the download is complete # chmod + x jdk-6u21-linux-i586-rpm.bin
Then execute it
#./Jdk-6u1-linux-i586-rpm.bin
Some options may appear in the process, direct Yes
After installation, the environment variable program is installed under/usr/Java by default.
Note: In Windows, multiple values are separated by semicolons (;), but in Linux, the colon is used:

# Vim/etc/profile
Add the following content at the end of the file
Export java_home =/usr/Java/jdk1.6.0 _ 21
Export java_bin =/usr/Java/jdk1.6.0 _ 21/bin
Export Path = $ path: $ java_home/bin
Export classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar
Export java_home java_bin path classpath

If the permission is insufficient, add sudo to the command.
Check the Java version later.

# Java-version
Java (TM) se Runtime Environment (build 1.6.0 _ 21-b06)
Java hotspot (TM) server VM (build 17.0-f8, mixed mode)
After the Java environment is configured, install ide again. Eclipse is recommended for Google.
Eclipse Installation
I am also a newbie, and of course everything is up to date. Eclipse also downloads the latest version of eclipse (Helios version ). Download eclipse
Http://www.eclipse.org/downloads/
Eclipse IDE for Java developers, 98 MB Linux 32 bit
People who have experience in Java Development basically know that eclipse is a green version and can be used after decompression. Double-click the eclipse file in the eclipse folder to run Eclipse IDE for Java dvelopers. You are familiar with it. Set up the workspace. You are welcome to turn off the interface and go to the development environment.
I put eclipse under/home/Android/, and I will put everything I need under it later.
ADT Installation
ADT version:
ADT 0.9.7 (May 2010) Android Development Tool

(1) Use the eclipse upgrade manager to install ADT:
1. Start eclipse and go to help> install new software.
2. In the available software dialog box, click Add ....
3. The add site dialog box appears, enter a name in the Name field (for example, "android plugin"), enter URL in the location field: https://dl-ssl.google.com/android/eclipse/
4. Note: If you have any questions, you can change HTTPS to HTTP. Click OK.
5. Return to the available software interface and you should see "Developer Tools ". Select checkbox. Click Next, accept the license agreement, and then click Finish.
6. Restart eclipse.
(2) manually install ADT and download the ADT. Http://developer.android.com/sdk/index.html
After the download is complete, decompress the package and copy the corresponding file to the corresponding eclipse directory ..
You can also point the help> install new software. installation address to the ADT folder after decompression, as shown in the preceding figure.
Android SDK Installation
Download the android SDK core package
For linux version http://developer.android.com/sdk/index.html
You need to know that this zip package is not a complete package. The Android software package adopts the form of "components". You can select components as needed. The preceding ZIP file contains only one component management tool and one basic tool component.
.
Next we will configure the ADT installed above
Configure the ADT in eclipse to point it to the android SDK.
1. Select eclipse WINDOW> preferences...
2. Select android
3. Click Browse... to locate the android SDK directory. For example, my directory:/home/Android/android-sdk-linux_86
4. Click Apply and OK.
The development environment has been set up with the baseline, but we still need to upgrade and download some things and complete the SDK. There are many update packages, including the DOC file, sample samples code, and SDK files. The whole process will automatically download and install:
1. run eclipse and select Window> Android SDK and AVD manager. (if Android SDK and AVD manager cannot be opened in eclipse. you can find Android or android SDK running in the tools directory under Android-SDK. It is best to run it with the sudo command in the command line, so that it will not fail because of insufficient permissions)
2. Select installed packages in the left-side navigation pane.
3. Click Update all.
The choose packages to install dialog appears. Select accept all and click Install
About 1.4gb capacity. If there is no problem with the internet, it will definitely be done in one night.
4. Create an AVD
To enable the Android Application to run on the simulator, you must create an AVD.
(1) In eclipse. Choose Windows> Android SDK and AVD Manager
(2) Click virtual devices on the left panel, and then click New on the right.
(3) Fill in the name and select the target API. the SD card is of any size and skin is selected. Currently, hardware retains the default value.
(4) Click Create AVD to create AVD.

Related Article

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.