Build an Android Development Environment

Source: Internet
Author: User
Build an Android Development Environment

When writing this article, the latest Android SDK version is 2.1. Now let's take a look at how to build an Android 2.1 Development Environment on the Windows platform.

The software package to be downloaded in advance is as follows:

1. JDK 1.6 +
2. Android sdks 1.6
3. Android SDK Setup
4. Eclipse IDE for Java Developers

When you see this, you may be anxious to ask: "Isn't it necessary to build an Android 2.1 Development Environment? How can I download Android SDK 1.6 instead of 2.1 ?"

That's right. It's about how to build the Android 2.1 development environment. However, after several attempts, I found that there was a problem with directly downloading and installing Android SDK 2.0 and 2.1. What's the problem? To put it simply, the two latest sdks do not include the adb.exe file, and the Android SDK location cannot be specified in Eclipse (that is, it cannot be developed using Eclipse ). Therefore, this has taken the path of saving the nation. Maybe, as my own attempt has proved, Android SDK 2.0 and 2.1 are actually upgrade packages, rather than the complete development packages. After comparison, the sizes of Android SDK 2.0 and 2.1 are 77.3 MB and 1.6 MB respectively, while the size of Android SDK 248 is MB, which is quite different, this seems to prove my judgment. However, in any case, download Android SDK 1.6 first, and then download and update Android SDK 2.0 and 2.1 through the ADT (Android Developer Tools, Android Developer Tools) and Android SDK Setup program, yes.

Let's talk less and get down to the truth.

First, access http://java.sun.com/javase/downloads/widget/jdk6.jsp
Download Java SE Development Kit 6u20(jdk-6u20-windows-i586.exe)
The file size is 76.67 MB.

Second, access http://dl.google.com/android/archives/android-sdk-windows-1.6_r1.zip
Download Android SDK 1.6(android-sdk-windows-1.6_r1.zip)
The file size is 248 MB.

Then, access http://dl.google.com/android/android-sdk_r04-windows.zip
Download Android SDK Setup(android-sdk_r04-windows.zip)
The file size is 22 MB.

Finally, access http://www.eclipse.org/downloads/
Download Eclipse IDE for Java Developers(eclipse-java-galileo-SR2-win32.zip)
The file size is 92.7 MB.

After the download is complete, start installation and configuration.

Step 1: install and configure JDK.

After the download, run jdk-6u20-windows-i586.exe in double-click mode. If you select to install jdk-6u20-windows-i586.exe in the C: \ Java \ jdk1.6.0 _ 20 directory (of course, there is no problem when installing jdk-6u20 ). After installation, configure the environment variables. The procedure is as follows:

(1) set the JAVA path

Right-click "my computer", select "properties", open the "System Properties" dialog box, click the "advanced" tab, and click "environment variables, in the displayed dialog box, click "new" under "system variables", enter JAVA_HOME in "variable name", and enter C in "variable value: \ Java \ jdk1.6.0 _ 20, click "OK ".

(2) set the CLASS path

Create a system variable, enter CLASSPATH in the variable name, and enter.; % JAVA_HOME % \ lib \ tools. jar in the variable value.
Note: The. (DOT) in the first.; indicates the current path, and the (semicolon) indicates the path separator. The following % JAVA_HOME % references the previously created JAVA installation path.

(3) set the PATH

Generally, PATH variables are available. Select "edit" and add "% JAVA_HOME % \ bin" after "variable value". % JAVA_HOME % \ jre \ bin, pay attention to the semicolon.

In this way, JDK is installed. "Start-> Run", Enter cmd, and enter "java-version" in the command line prompt. the java version "1.6.0 _ 20" information should be displayed. JDK is successfully installed.

Step 2: decompress and configure Android SDK 1.6

Decompress the downloaded android-sdk-windows-1.6_r1.zip file to the C: \ android-sdk-windows-1.6_r1 directory (which directory does not matter ). Then, configure the environment variable. The procedure is as follows:

(1) set the Android path

Repeat Step 1 (1), create a new system variable, enter Android_Home in variable name (case-insensitive), and add C: \ android-sdk-windows-1.6_r1 in variable value.

(2) set the PATH

"Edit" PATH variable, and add; % Android_Home % \ tools after "variable value". Note the semicolon before.

In this way, Android SDK 1.6 is installed. "Start-> Run", Enter cmd, and enter "android-help" in the command line prompt. The help information should be displayed. Android SDK 1.6 is successfully installed.

Step 3: Decompress Eclipse, associate Android SDK, and install ADT

Decompress the downloaded eclipse-java-galileo-sr2-win32.zip file to C: \ eclipse. then, double-click eclipse.exe to start Eclipse.

Install ADT: menu "Help-> Install New Software ...", Open the Install dialog box and click Add... Click Add Site, enter ADT in Name, and enter https://dl-ssl.google.com/android/eclipse/in Location /. Then download and install ADT.

Associate with Adnroid SDK: menu "Windows-> Preferences". Open the Preferences dialog box and click Android. In the Android Reference on the right, Click Browse… on the right of the SDK Location text box... Button, locate C: \ android-sdk-windows-1.6_r1, OK ".

(If you do not upgrade the Android SDK, 1.5 or 1.6 is acceptable)
Step 4: Decompress Android SDK Setup and download and update Android SDK 2.0 and 2.1

Decompress the downloaded android-sdk_r04-windows.zip file to C: \ android-sdk-windows, enter the folder, double-click SDK Setup.exe, start Android SDK and AVD Manager, and select the Settings item on the left, then select Force https: //… In the right-side pane ://... Sources to be fetched using http: //, and then select Save & Apply. Then, see the illustration here:

How to Use Android SDK Setup? Http://www.android123.com.cn/zhongwensdk/366.html

I have selected all the content to be updated, including:

* Android SDK Tools, revision 5
* Documentation for Android SDK, API 7, revision 1
* SDK Platform Android 2.1, API 7 revision 1
* Sapmles for sdk api 7, revision 1
* SDK Platform Android 2.0.1, API 6, revision 1

Wait patiently -- Note that if there is a prompt during the update process, it may be because you are using the C: \ android-sdk-windows-1.6_r1 directory, or anti-virus software does not allow rewriting of files in it, in this case, You need to exit all programs or temporarily disable anti-virus software.

If everything goes well, the Android 2.1 Development Environment (or the Android 1.6, 2.0, and 2.1 development environments) will be ready.

Appendix:
Http://www.android123.com.cn/android_kit.html

Thanks: http://www.android123.com.cn/

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.