Build an Android environment

Source: Internet
Author: User
Tags virtual environment android sdk manager

1. Installing the JDK

On the Java official website download the corresponding system JDK file installation, such as Win7 64-bit system installation jdk-6u45-windows-x64, all select the default installation path can be installed.

2. Configuring environment Variables for JDK

2.1 Java_home

New java_home environment variable, to capitalize, the path to install the JDK to find, copy,

2.2 CLASSPATH

NEW: Classpath=%java_home%/lib/dt.jar;%java_home%/lib/tools.jar

2.3 PATH

The PATH variable does not need to be created, and the variable is already in the system, as shown in:

Select the variable, click "Edit", the red part of the copy, Path=%java_home%/bin;%java_home%/jre/bin;

Paste to the end of the PATH environment variable, and before pasting, add an English to the last environment variable; Click OK

Complete the configuration.

2.4 Verifying environment variable configuration

1) Open CMD Command Line window

2) Enter java–version in the Command Line window, as shown, indicating that the environment variable is configured successfully.

3. Android SDK Environment Setup

3.1 Installing (extracting) files

First download the appropriate SDK files on the Android official website ,

Unzip the file, try not to extract the file directory with Chinese path, directory also do not too deep, here I default

Extracted to the D-disk,

3.2 Configuring the Android SDK environment variables

1) because a lot of commands in the file directory are subsequently used, so you need to set the environment variables, open the Build-tools/android folder, copy the path in the address bar,

2) in the System environment variable, select Path, edit, detail can refer to the Document 2.3 section, note the semicolon; click "OK"

3) Go to the SDK file directory, configure the second environment variable, open platform-tools This folder, the path bar

To copy the path in the

Open environment variable, continue editing environment variable Path, remember to add; Click "OK".

4) Configure the SDK file directory replication to the environment variable Path,

4. Configure Eclipse

1) Open Eclipse and run the Eclipse.exe file

3) When the operation is complete, the following page appears:

4) on the open page, click on the option Windowàperferences in the menu bar:

5) In the Open dialog box, view the second option Android, followed by a sdkloaction, if the sdklocation

There is no content, then by clicking on the button "Browse" button, to the file directory you have configured to select,

Select the following as shown, then click "Apply", if there is a direct path can be ignored.

6) After clicking "Apply", you will see the information shown in the highlighted green position, click "OK"

7) Click Windows again and select Android SDK Manager

Android SDK M

Android SDK Manager will update the Android SDK version on this computer as shown in:

In the updated dialog box, select at least one lower version and a later version of the SDK to install:

After the download update is complete, open the Android virtual Device Manager windows->android Virtual Appliance Manager,

5. Virtual machine settings

5.1 Creating a new virtual machine

1) After the new open is empty, we can create a new Android virtual device ourselves

2) Click on "New" to enter the virtual device information in the popup dialog box:

3) After clicking "OK", an Android virtual machine named Test was created successfully:

5.2 Running the Test virtual machine

1) Select the virtual machine, click Start, a configuration window will pop up, click to run directly.

2) Click "Launch", the virtual machine will appear the start interface, depending on the machine configuration, the time to start up is different, please wait patiently ...

The screen that is starting:

3) After a period of patient waiting, the Android virtual machine has started up:

4) After clicking on the large blue icon "OK" in the lower right corner, it will completely show my Android virtual Machine page.

5) After starting, we can simulate some of the things that the real machine can do. The ability to follow the documentation to see this visual page indicates that our virtual machine environment is OK.

6. Verify the Android SDK related environment variables

The SDK environment variables that we want to verify are the environment variables that are configured in section 3.2 of this document

Open CMD Command Window

6.1 Verifying Platform-tools environment variables

1) Verify that you can access the current virtual machine system

2) in the background of the virtual machine is a Linux system, the command line to execute the LS command, you can see the current system of all

File directory

3) exit the virtual environment

6.2 Verifying environment variables under the tools directory

1) Enter Andiord in the Command line window

2) This command launches the Android SDK Manager

6.3 Verifying Build-tools environment variables

1) in the command line input AAPT, you will see the use of this command help information

Build an Android 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.