Android-Development Environment Construction

Source: Internet
Author: User
1 -- download required software

Android SDK: http://developer.android.com/sdk/index.html

Eclipse: http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigor

JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html

Install JDK before installing SDK and eclipse. Click JDK above and double-click Next to install JDK successfully. The installation method is relatively simple and will not be described here.

2 -- install Android SDK & AVD Manager

Step2.1: After the android sdkdownload is successful, the installation file "installer_r15-windows.exe" under the corresponding directory is displayed. Double-click to run:

Step2.2: If JDK has been successfully installed, it will be detected by the system. If no JDK is found, you need to reinstall it.

Step2.3: After selecting the installation directory, remember this directory and locate the address when setting eclipse.

Step: select the installation directory and click Next to start AVD Manager installation.

Step2.5: AVD manger is successfully installed! The system prompts you to start AVD manager to download and install the android SDK of each version. Select Start SDK manger and click Finish.

Step2.6: AVD manger started successfully! The packaes list lists the sdks of different versions. I am in the initial stage of development and do not know whether all versions can be used in the future. I will choose all versions for the sake of perfection, and I will not be able to use much disk space anyway. Select all the check boxes in the packages list and click "Install 39 packages ..." Start to download the SDK.

Step2.7: the download takes some time. After the download is complete, the system automatically installs the tools and sdks selected in the packages list. If the following page is displayed, the SDK of each version is successfully installed.

3 -- install and configure the eclipse environment ADT

Step: Use eclipse to develop Android applicationsProgramBefore creating a project, install ADT (Android development tools), which is a development tool for Android.

Step: Start eclipse, select "window", and select "install new software". The following interface is displayed.

Step3.3: click "available software sites". In the new window, click "add" and enter the ADT plug-in URL https://dl-ssl.google.com/android/eclipse.

Step: Go back to the page shown in step and find the one in the "Work with" drop-down list box. The ADT address we entered in the previous step is available. Select the address and proceed to the next step.

Step: After you select the ADT Update site, all "Developer Tools" under the site will be displayed in the list below. Here we select all, and then click "Next ".

Step 3.6: Eclipse starts to download the selected software.

Step 3.7: After the installation is successful, the system prompts you to restart eclipse. We choose to restart immediately.

Step 3.8: After eclipse is restarted, we will be prompted to configure the SDK. In this interface, select "use existing sdks" and select the SDK installation directory, which is the SDK installation directory selected by step. Click "Next" and the ADT is successfully installed.

4 -- create and configure the android simulator AVD before development

The Android Application we developed can run on a local simulator. Therefore, before developing our first application, we should first understand how to create and configure the simulator. AVD (Android Virtual Device) was introduced from Android 1.5. It is a configured simulator. When creating an AVD, you can select parameters such as screen resolution, keyboard, and SD card size. The AVD creation method is as follows:

Step 4.1: Select "window" and then select "AVD manager ".

Step: The system opens the "android Virtual Device Manager" window.

Step: click "new" to create an AVD. Select the corresponding parameter and click "create AVD ".

Step 4.4: the AVD is successfully created. On the "android Virtual Device Manager" page, you can view the newly created AVD.

5 -- create the first Android Application

Step 5.01: Create an android project, "file"> "new"> "project ".

Step 5.02: In the displayed "new project" dialog box, expand the "android" item and select the "android project" subitem.

Step 5.03: Enter the project name "helloandroid" and select "Next.

Step 5.04: select the SDK version number for this project.

Step 5.05: Enter "package name ".

Step 5.06: click "finish" to generate the application framework. The document structure is as follows.

Step 5.07: In the "package Explorer" window, click the newly created "helloandroid" project folder and right-click the project name, run the "run as -- Android Application" option on the function menu to compile and run the current project.

Step 5.08: Start the simulator. The speed may be slow and you can wait patiently.

Step5.09: After the simulator is started, the system runs the current program, and the result of the current program running is displayed on the screen.

Step 5.10: another method to run the current program is to open the Software Directory of the system, find the application name "helloandroid" of the current program, and click "run.

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.