Android learning process (2) Building Android development environment

Source: Internet
Author: User
Tags android sdk manager

This section will be divided into five steps to complete the deployment of an Android development environment.

First step: Install the JDK. Step Two: Configure the variable environment for the JDK on Windows. Step three: Download and install Eclipse. Fourth step: Download and install the Android SDK. Fifth step: Install the ADT plugin for Eclipse.

(1) Installing the JDK:

JDK (Java SE Development Kit Java Standard Development Toolkit). The JDK is the core of Java, containing the Java runtime (Java Runtime Environment), a stack of Java tools, and a Java class library that is called when developers develop applications.

The JDK contains the basic development tools:

1 . Javac:java compiler, turn source code into bytecode.  2. Jar: Package tool to package related class files into one file.  3. Javadoc: Document generator, extracting documents from source notes.  4. Jdb:debugger, debug the error-checking tool.  5. Java: Run the compiled Java program.

1) Download JDK

Available to download the latest version: (http://www.oracle.com/technetwork/java/javase/downloads/index.html)

Or to Baidu Cloud Download (date: January 26, 2016):(http://pan.baidu.com/s/1skOawFz)

2) After installing the JDK, the local (C:\Program Files\java) path will appear

Note : viewing these two files will reveal that there is also a JRE in the JDK directory, and you will be alerted to the need to install two JRE at the time of installation.

1 The JRE in the local C:\Program Files\java directory is used by the Windows system to make it easier for the system to invoke the JRE interpreter class file to run the Java client program.  2. The JRE under the JDK directory is used to develop a Java client or server-side program (extra).

(2) Configure environment variables: (provides an index of DOS command-line tools)

Configuring any application's. exe file to the path will have the ability to launch the app directly under the DOS page.

       we need to set three system variables, Java_home,path and classpath, respectively.

1 . Java_home  Set this system variable name first, the variable value is the JDK on your computer installation path: C:\Program files\java\jdk1. 8. 0_20. Once created, you can use%java_home% as the unified Reference path for the JDK installation directory.  2. The path  Path property already exists and can be edited directly, appended to the original variable:; %java_home%\bin;%java_home%\jre\bin; 3 . CLASSPATH   Set system variable name: CLASSPATH  Variable value is:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar; Note: The variable value string is preceded by a ". " represents the current directory, and the purpose of setting up classpath is to tell the Java execution Environment which directories can find the classes or packages that are required for the Java program you want to execute.

(3) Download and install Eclipse:

Official website: (https://www.eclipse.org/downloads/)

Baidu Cloud Download Link: (Http://pan.baidu.com/s/1miJHdbE)

Eclipse does not need to be installed, after the download unzip the package, cut the Eclipse folder to the place where you want to install, open when you set up your working directory.

Note : Eclipse here is in English, if you need Chinese version, Chinese language pack is required: (Http://pan.baidu.com/s/1dFxAEPF)

Replace the two files with the same name under Eclipse with the following two files

(4) Download and install the Android SDK: (Http://pan.baidu.com/s/1ge5xQVL)

We're going to develop Android apps through eclipse, so we need to download the Android SDK (software development Kit) and install the ADT plugin in Eclipse, which lets Eclipse and Android SDK to associate.

To facilitate the use of the development tools included with the Android SDK, we set the path in the system environment variable to the tools directory under the installation directory of the Android SDK:

my Program Organization Directory :(the JRE for the system to run the Java client program on the C drive, JDK custom storage)

In the Android SDK installation directory, double-click "SDK Manager.exe" to open the Android SDK Manager,android SDK Manage is responsible for downloading or updating different versions of the SDK package.

There are two ways to install ADT:

1. Use the Android SDK to download the installation on Google's official website (we need to FQ and configure VPN in advance, we recommend using Lantern blue light)

2. Use the domestic mirror server (http://www.androiddevtools.cn/);

1. Click Options under Tools Files

2) (Force Https://..sources-be fetched using http://) Tick this out and configure the following

(5) Install the ADT plugin for Eclipse:

to make Android apps easier to create, run, and debug, Android's development team specifically customized a plugin for the Eclipse IDE: Android Development Tools (ADT). ADT also enables the Android SDK to be associated with eclipse.

To install ADT Online:

1) Launch Eclipse, click on the "Help" menu, Install New software ...?, click Add in the Pop-up dialog box ... Button.

2) Select the tool to install in the popup dialog box

When installed, you will be asked to restart Eclipse,eclipse and intelligently associate it with the Android SDK in the same directory as the directory location.

(6) problems that may arise :

If eclipse does not automatically correlate the installation directory of the Android SDK, you can select Windows-Preferences (preferences) in the open Eclipse, and you will see the Android settings in the popup panel, filling in the installed SDK path, The platform packages that you just installed in the SDK will appear, and you can complete the configuration by pressing OK.

Android learning process (2) Building Android development environment

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.