Android Entry 1: Android Development Environment installation and configuration Manual

Source: Internet
Author: User

 

Android Development Environment installation and configuration Manual

This document describes how to build an android development platform step by step.

1. Download Software

N jdk 1.5 + to http://java.sun.com/javase/downloads/index.jsp download

N eclipse 3.3 (europa) to http://www.eclipse.org/downloads/ download

N Android SDK to http://developer.android.com/sdk/1.5_r1/index.html download

2 install software and configure the environment 2.1 install JDK

The downloaded JDK is an executable Installer. Double-click to install it. Assume that the installation path is C:/program files/Java/jdk1.6.0 _ 05 (other paths can also be used ).

After JDK is installed, set the system environment variables: Right-click my computer, select "properties", and select the "advanced" tab to enter the environment variable settings. Set environment variables: java_home, path, and classpath.

2.1.1 set java_home

In the system environment variable column, click-> Create java_home (java_home points to the JDK installation path ). Variable name: java_home; variable value: C:/program files/Java/jdk1.6.0 _ 05

Purpose:

L for reference convenience, for example, when JDK installs the C:/program files/Java/jdk1.6.0 _ 05 directory, java_home is set as the directory path. When this path is used in the future, you only need to enter % java_home % to avoid entering a long path string for each reference;

L normalization principle: When the JDK path is changed, you only need to change the variable value of java_home. Otherwise, you need to change any document that uses the absolute path to reference the JDK directory. If not, if a program cannot find JDK, the consequence is that the system crashes!

L third-party software will reference the agreed java_home variable. Otherwise, you will not be able to use the software normally.

2.1.2 set the PATH variable

Find the PATH variable in the system variable and select-> edit. (There are many variable values in it, is to add % java_home %/bin; at the beginning of the variable value or other positions ;). Variable name: path; variable value: % java_home %/bin;

Purpose: To run Java applications, such as javac, Java, and javah, in any part of the system, find the JDK installation directory. For example, if JDK is installed in C: under the/program files/Java/jdk1.6.0 _ 05 directory, we often use Java applications in the C:/program files/Java/jdk1.6.0 _ 05/bin directory, we need to add the C:/jdk1.6.0/bin directory to the path environment variable.

2.1.3 Set the classpath Environment

In the system environment variable column, click-> Create classpath. Variable name: classpath; variable value :.; % java_home %/lib/; % java_home %/JRE/lib/(note that there is a ". ", indicating the current directory. When we run Java Aclass, the system will first find the Aclass file in the current directory .)

2.1.4 JDK Environment Test

After the configuration is complete, write a simple Java program to test whether j2sdk has been installed successfully:

Public class helloworld {

Public static void main (string [] ARGs ){

System. Out. println ("Hello world! ");

}

}

Save the program as a document named helloworld. java. Open the Command Prompt window, go to the directory of helloworld. Java, and type the following command:

Javac helloworld. Java

Java helloworld

2.2 install eclipse

Extract the downloaded eclipse package to the corresponding installation directory.

2.3 configure the android environment 2.3.1 install the android development tools (ADT) Plug-in

Start eclipse and choose help> Software Updates> Find and install ....

 

In the displayed dialog box, select search for new features to install and click Next to go to the next step.

 

Select new remote site. In the displayed dialog box, enter the remote site name (for example, Android plugin) and the site URL: https://dl-ssl.google.com/android/eclipse/. Click OK to return to the window. In the current window, select Android plugin and Europe discovery site, and click Finish to go to the next search process, as shown in.

 

 

In the search result box, select Android plugin and click Next to go to the next step. If an error message is displayed, click Select required in the toolbar on the right (it may take several minutes), and then click Next to go to the next step, as shown in.

 

 

Read and accept license agreements, and click Next to go to the next step.

 

Confirm the installation path and click Finish. The download box is displayed, as shown in.

 

 

In the displayed verification box, select install all to start installation, as shown in.

 

 

Select Yes and restart eclipse

 

In eclipse, select File-> New-> project. In the new project dialog box, you can find the android project option, as shown in, indicating that the ADT plug-in is successfully installed.

 

2.3.2 apply the android SDK to eclipse

In the eclipse toolbar, choose Window> preferences...

 

Select android from the menu on the left, select the decompressed SDK directory in the browsing box on the right as the SDK location, click Apply, and then click OK.

3 references:

Http://developer.android.com/sdk/1.5_r1/installing.html

 

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.