Andriod-using Eclipse to build your environment

Source: Internet
Author: User

From the Internet to find, did a little change, I tried it myself, 1.3 steps I did not do, and finally did not affect.

Before starting the Android development journey, first build the environment and then create a simple HelloWorld. The topics in this article are as follows:

1. Environment Construction 1.1 JAVA-JDK Installation

If you do not have the JDK, you can go here to download, the next task is to install the prompt step-by-step. The steps for setting environment variables are as follows:

    1. The following environment variables are added to the system variables, such as environment variables, properties---
    2. The Java_home value is: D:\Program files\java\jdk1.6.0_18 ( the directory where you installed the JDK )
    3. The Classpath value is:.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar;%java_home%\bin;
    4. Path: Append%java_home%\bin at the beginning;
    5. Note: setting environment variables in the previous four steps is not necessary for building an Android development environment and can be skipped.

After the installation is complete, you can check that the JDK is installed successfully. Open the cmd window and enter Java–version to view the version information for the JDK . A screen similar to the following shows that the installation was successful:

Figure 1, verifying that the JDK installation is successful

1.2. Eclipse Installation

If you still have eclipse, you can download it here and download the win 32bit version of Eclipse IDE for Java Developers (92M) as shown:

Figure 2, Eclipse download

Can be used after decompression.

1.3. Android SDK Installation

Download Android-sdk_r05-windows.zip on Android developers and unzip to any path when download is complete.

    • Run SDK Setup.exe, and click Available Packages. If you do not see an installable package, click Settings, select "Force https://..." in misc, and then click Available Packages.
    • Select the SDK and its documentation or other packages you wish to install, click Installation Selected, Accept all, install Accepted to begin downloading and installing the selected package
    • The new path value in the user variable is: the tools absolute path in the Android SDK (this machine is D:\AndroidDevelop\android-sdk-windows\tools).

Figure 2, setting environment variables for Android SDK

After "OK", restart the computer. After restarting the computer, go to the cmd Command window and check that the SDK is installed successfully.
Run Android–h If you have output similar to the following, it indicates that the installation was successful:

Figure 3, verifying that the Android SDK is installed successfully

1.4, Android-adt installation
    • Open the Eclipse IDE and go to "help", "Install New Software" in the menu
    • Click Add ... button, the pop-up dialog asks you to enter name and location:name yourself, location input http://dl-ssl.google.com/android/eclipse. (You can also go online to download ADT-8.0.1 (http://files.cnblogs.com/cxeye/ADT-8.0.1.zip) and then location to select this compression package) as shown:

    • After determining the return, select the ADT we just added in the drop-down list after work with, and we'll see the developer Tools below that expand it will have Android Ddms and Android development Tool, tick them. As shown in the following:

    • Then just follow the prompts step by step next.

1.5, ANDROID-SDK Installation

Download the Android-sdk-windows compressed package and unzip it. Click Preferences on the window. Select the path of the current package and click Save.

1.6. Andirod Create AVD Simulator

To enable Android applications to run on the emulator, you must create an AVD.

    • 1. In Eclipse. Select Windows > Android SDK and AVD Manager
    • 2. Click Virtual Devices on the left panel, then click New on the right.
    • 3, fill in the name, select the target API,SD card size arbitrary, skin random choice, hardware currently keep the default value
    • 4. Click Create AVD to complete the AVD creation

2, HelloWorld
    • Create a new project "Android Project" Through the Project menu, file-I
    • Then fill in the necessary parameters as shown in: (Note here I checked the Google APIs, you can choose what you like, but you want to create the appropriate AVD)

Description of the relevant parameters:

  1. Project name: The names of the folders that contain this project.
  2. Package Name: Packages name, following Java specification, it is important to distinguish different classes by package name, I use Helloworld.test.
  3. Activity name: This is the main class name of the project, and this class will be the subclass of the activity class of Android. An activity class is a simple launcher and control program class. It can create an interface as needed, but it is not required.
  4. Application Name: An easy-to-read title on your application.
  5. The "Use default location" option in the "Selection bar" allows you to select an existing project.
    • After clicking Finish, click on the eclipse's Run menu to select Run configurations ...
    • Select "Android Application", click on the upper left corner (button like a piece of paper with a "+" number) or double-click "Android Application", there is a new option "New_configuration" ( can be changed to our favorite name ).
    • In the right Android panel, click Browse ..., select HelloWorld
    • Tick the appropriate AVD in the automatic of the target panel, and if there is no AVD available, you need to click on the manager in the lower right corner and create the appropriate AVD. As shown in the following:

    • Then click the Run button, and if successful, there will be an Android emulator interface, as shown in:

Andriod-using Eclipse to build your environment

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.