My android learning journey [2] -- building an android Development Environment

Source: Internet
Author: User

--Without accumulating steps or even thousands of miles; without accumulating small streams, it cannot become a sea of rivers

To do something better, you must first sharpen the tool. The developer's preferred developer is the eclipse + ADT plug-in. The developer chooses the Java language, so JDK installation and configuration are essential ~ Well, let's start our journey of creating artifacts ~

1,JDK Installation

JDK version 5 or above is required. You can download it from the home page of Sun (sadly, it should be the home page of Oracle ). The download is executable.ProgramAfter the download, the "Next" installation is completed. How to configure the Java environment is skipped ~

 

2,Download Eclipse IDE

The eclipse version used by the author is the same as that used in Bluetooth development from the mobile phone to the PC [1] -- the versions used in the development environment Introduction are all eclipse 3.5 Galileo versions. The download link is located in thatArticleAlso gave ~ Eclipse is a green version, so you can use it after downloading it and directly decompressing it to a fixed directory, skipping a few words ~

3,Android SDK

Currently, there are 14 versions of the android SDK that can be downloaded from the first 0.9 to 2.1, so for developers who are new to Android, one of the headaches is to select the SDK version ~ Which SDK version is suitable? I chose version 1.5, which is a bit of a compromise, but it is not completely blind ~

First, although the T-Mobile G1 mobile phone carrying the Android system can be upgraded to the firmware of version 1.6 on the official website, it is used in version 1.6r1 and the API level is 4. However, the data shows that most G1 users around the world are upgraded to the firmware version 1.5 (cupcake, supporting the screen soft keyboard and Input Method version), so API Level 3 is relatively safe ~

Second, the G2 mobile phone is mainly firmware of version 1.5 and 1.6, and version 1.5 is also a good choice ~

Let's take a look at the G3 mobile phone, that is, the launch of the HTC hero mobile phone is also accompanied by the cupcake firmware of android1.5. One of my colleagues recently bought it, the firmware version is 1.5 (1.5 is selected for the first reason ).

Therefore, based on the above considerations, a considerable number of models are configured with the firmware version 1.5. Therefore, the Android version is used for better compatibility.

Okay. Start download ~ After downloading Android SDK 1.5, decompress it to a fixed directory. The decompressed path isD: \ Program
Files \ android-sdk1.5_r1, then set the next environment variable, add in the system variable path; D: \ Program Files \ android-sdk1.5_r1 \ tools (note the semicolon above)

Now, the android SDK is ready ~

4,Install ADT plug-in

ADT is short for Android development tools. You can use ADT to create Android simulators and set simulator information. Because Android sdk1.5 is selected, ADT selects the corresponding version 0.9 ADT plug-in. Install the Eclipse plug-in either through the network or locally, as shown below:

Ø  Network-based Installation 

Procedure 1 , Start Eclipse, Select Help-> install new software, As shown in:

Procedure 2 Click Add Button, and enter ADT Plug-in URL ( Because the website address is frequently changed, you can search for it on your own. )

Ø  Download to local Installation 

After downloading to the local device, the only difference between the installation and the network is: ClickArchive, Browse to the localAdt0.9.rarCompressed package (omitted)

 

5,Create AVD

AVD is the android virtual device, and Chinese is the meaning of Android Virtual Devices. Users with experience in the development of j2s should be aware of it, several types of simulators can be used to perform simulated operations in the IDE. In Android development, we first need to create a virtual device based on our own needs to let the program we have compiled run and debug in it, each created AVD has its own core, Data Partition, SD card, user data, and appearance.

Android sdk1.5 has AVD for three target platforms: The target platform of Version 1.1 with API Level 2, the target platform of version 1.5 with API Level 3, and the Target Platform Based on version 1.5 for development target Platform with a Google Map application.

1) Open the command line and enter Android list target to view the above three target platforms:

2) Enter Android list AVD in the command line to view the currently available AVD.

(None by default)

 

3) Enter Android create AVD -- name and15 -- Target 2 in the command line to create an AVD.

(Note: In the command, the parameter after -- name is the name of the created AVD, for example, and15; the parameter after -- target is the ID of the target platform, refer to the three target platforms listed in the first step of the command. After the command is changed, you can determine whether to customize AVD parameters. If you do not need to select No, otherwise, select y to start customization)

4) in this case, enter Android list AVD in the command line to view the created AVD:

Now a new AVD is created. If you are not satisfied, you can use Android Delete AVD-name and15 to delete the created AVD, you can enter Android-help to learn more about other commands.

6,After creating AVD, you need to make some configuration in eclipse.:

Step 1. Menu Bar window-> preference:

Step 2,SetSDKOfLocation

Step 3,Open menu bar Run-> run commands... , As shown below

Step 4, Double-click Android Application Option, configure the corresponding information

( Note: settings Name Is Androidavd,
Project Under Androidtest Is Android Project )

Step 5. Set the target

(Note: select the createdAVD)

7,Now the development environment is finally configured. Let's take a look.:

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.