Build an Android development environment

Source: Internet
Author: User
Tags java se

http://www.cn-cuckoo.com/2010/04/18/make-a-android-develop-environment-1512.html

When writing this article, the latest version of the Android SDK is 2.1. Now, let's look at how to build an Android 2.1 development environment under the Windows platform.

The packages that need to be downloaded in advance are:

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

Seeing these, perhaps impatient friends will be tempted to ask: "Not to build the Android 2.1 development environment?" How to download Android SDK 1.6 instead of 2.1? ”

Yes, it's about how to build the Android 2.1 development environment. However, after several attempts, I found that the direct download installs Android SDK 2.0 and 2.1 with problems. What's the problem? Simply put, either the latest version of the SDK package does not contain the Adb.exe file, and it is not possible to specify the location of the Android SDK in Eclipse (which means you cannot use Eclipse to develop). Therefore, it took a curve to the salvation of the road; perhaps, as my own attempt confirms: Android SDK 2.0 and 2.1 are actually upgrade packages, not full development packages. I compared the size of Android SDK 2.0 and 2.1 is 76.6MB and 77.3MB, and the size of Android SDK 1.6 is 248MB, the difference is very wide, which seems to support my judgment. However, in any case, download and update the Android SDK by downloading and updating the Android SDK 1.6 with the ADT (Android Developer tools,android Developer Tool) and the Android SDK setup. 2.0 and 2.1, were successful.

Talk less, and come to the chase.

First, visit the 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, visit 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)
File size 248M.

Then, visit http://dl.google.com/android/android-sdk_r04-windows.zip
Download Android SDK Setup (Android-sdk_r04-windows.zip)
File size 22MB.

Finally, visit http://www.eclipse.org/downloads/
Download Eclipse IDE for Java Developers (Eclipse-java-galileo-sr2-win32.zip)
File size 92.7MB.

After the download is complete, start the installation and configuration.

The first step is to install and configure the JDK.

After downloading, double-click Run Jdk-6u20-windows-i586.exe, assuming you choose to install to the C:/JAVA/JDK1.6.0_20 directory (of course, there is no problem installing to the default path). When the installation is complete, the environment variable is configured. The steps are as follows:

(1) Setting the Java path

Right-click on My Computer, select Properties, open the System Properties dialog box, click the Advanced tab, click the Environment Variables button, under System Variables in the dialog box that opens, click New, and then fill in the variable name java_home in the dialog box, and fill in the variable value c:/ JAVA/JDK1.6.0_20, click OK.

(2) Set class path

Then "new" a system variable, in the "Variable name" fill in the Classpath, in the "Variable value" filled.; %java_home%/lib;%java_home%/lib/tools.jar.
Description: The beginning of the.; The. (point) Represents the current path, and (semicolon) is the path delimiter. The next%java_home% refers to the JAVA installation path that you just created earlier.

(3) Set path path

The path variable is generally available, so check the point "edit", then add it after "variable value",%java_home%/bin;%java_home%/jre/bin, and note the preceding semicolon.

This way, the JDK is installed. Run from start, enter CMD, and at the command prompt enter: java-version, you should be able to see the Java version "1.6.0_20″ information; the JDK installation was successful.

Step two, unzip and configure Android SDK 1.6

Unzip the downloaded android-sdk-windows-1.6_r1.zip to the C:/ANDROID-SDK-WINDOWS-1.6_R1 directory (there is no problem in which directory to extract). Then, configure the environment variables. The steps are as follows:

(1) Set Android path

Repeat the first step (1), create a "system variable", fill in the "Variable name" android_home (no problem with the case), and fill in the "Variable value" C:/ANDROID-SDK-WINDOWS-1.6_R1.

(2) Set path path

"Edit" the path variable, after "variable value", add;%android_home%/tools, note the preceding semicolon.

That way, Android SDK 1.6 is ready to install. Run from start, enter cmd, and then enter: Android-help in the command line prompt, you should be able to see the Help information; Android SDK 1.6 is installed successfully.

Step three, unzip Eclipse, associate Android SDK, install ADT

Unzip the downloaded Eclipse-java-galileo-sr2-win32.zip to C:/eclipse, then go to this folder, double-click Eclipse.exe, and start Eclipse.

Associated Adnroid SDK: Menu "Windows->preferences", open Preferences dialog, click Android, on the right side of Android reference, point SDK Browse to the right of the location text box ... button to find c:/android-sdk-windows-1.6_r1, "OK".

Install ADT: Menu "help, install New software ...", open the Install dialog box, click Add ... button, add site, fill in the name with ADT, and fill in the location with https://dl-ssl.google.com/android/eclipse/. Then, download install ADT.

Fourth step, unzip Android SDK Setup, download update Android SDK 2.0 and 2.1

Unzip the downloaded Android-sdk_r04-windows.zip to C:/android-sdk-windows, then go to this folder, double-click SDK Setup.exe, launch the Android SDK and AVD Manager, Select the left settings item, and then select Force https://... sources to is fetched using http://In the right panel, then select Save & Apply. Then, see the diagram here:

How do I use the Android SDK Setup? Http://www.android123.com.cn/zhongwensdk/366.html

I have selected all the content that needs 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

Be patient--note that if the update process is prompted, it may be because you are using the C:/ANDROID-SDK-WINDOWS-1.6_R1 directory, or the antivirus software does not allow files to be overwritten, you need to quit all programs or temporarily turn off antivirus software.

If everything goes well, the Android 2.1 development environment (or Android 1.6, 2.0, and 2.1 development environments) is built.

Appendix:

Android Development kits and related software
Http://www.android123.com.cn/android_kit.html

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

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