Android SDK 2.2 Development Environment Installation

Source: Internet
Author: User

This document describes the installation process of the android SDK, including: Android SDK 2.2, eclipse 3.5.2 (Galileo), and andoid development tools (ADT) plugin.

One premise is that you have installed JDK 6.0 or JDK. The path contains the JDK bin directory in the system environment variable.

[Install Android 2.2]

1. Download the "start package" of Android 2.2"

Windows: android-sdk_r06-windows.zip Mac edition: android-sdk_r06-mac_86.zip Linux edition android-sdk_r06-linux_86.tgz

You need to know that this zip package is not a complete package. The Android software package adopts the form of "components". You can select components as needed. The preceding ZIP file contains only one component management tool and one basic tool component.

2. run Android SDK and AVD manager.

Decompress the zip package and run the SDK setup.exe to start the andoid SDK and AVD manager. This tool not only manages the android SDK components, but also the android Virtual Device Manager. (For the latter, see the following example ).

Then, you can use this tool to download the complete Android SDK. Note that if the network uses a proxy server, you need to (possibly) configure the proxy server domain name and port in this tool.

(This section references: http://developer.android.com/sdk/installing.html or http://androidappdocs.appspot.com/sdk/installing.html)

[Install eclipse]

Address: http://www.eclipse.org/downloads/ download eclipse 3.5.2, the same, just extract.

[Install ADT]

ADT version:

ADT 0.9.7 (May 2010)

ADT 0.9.6 (march2010)

ADT 0.9.5 (December 2009)

ADT 0.9.4 (October 2009)

Use the eclipse upgrade manager to install ADT:

1. Start eclipse and go to help> install new software.

2. In the available software dialog box, click Add ....

3. The add site dialog box appears, enter a name in the Name field (for example, "android plugin"), enter URL in the location field: https://dl-ssl.google.com/android/eclipse/

4. Note: If you have any questions, you can change HTTPS to HTTP. Click OK.

5. Return to the available software interface and you should see "Developer Tools ". Select checkbox. Click Next, accept the license agreement, and then click Finish.

6. Restart eclipse.

[Configure ADT]

Configure the ADT in eclipse to point it to the android SDK.

1. Select eclipse WINDOW> preferences...

2. Select android

3. Click Browse... to locate the android SDK directory.

4. Click Apply and OK.

(This section content reference: http://androidappdocs.appspot.com/sdk/eclipse-adt.html)

[Create a virtual device]

After the development environment is set up, you can write a "hello World" application. However, you still need to create a virtual device.

Run eclipse and select Window> Android SDK and AVD manager.

On the left-side pane, select Virtual Devices.

Click new.

The create new AVD dialog box appears.

Enter the AVD name, for example, "my_avd ".

Select a target. The target is a platform (that is, the android SDK version, such as 2.2)

Temporarily ignore other settings

Click Create AVD.

[Hello world]

1) create a new Android Project

After creating AVD, the next step is to start a new Android project in eclipse.

Run eclipse and select File> New> project.

If the ADT plug-in is correctly installed, there should be an item in "android project": "android ". (After you create one or more Android projects, an "android XML file" portal should also be visible .)

Select "android project" and click Next.

Enter the following project information:

Project name: helloandroid

Application name: Hello, Android

Package name: COM. example. helloandroid (or your own private namespace)

Create activity: helloandroid

Click Finish.

2). CompileCode: Print Hello android

Package com. Android. helloandroid;

Import Android. App. activity;

Import Android. OS. Bundle;

Import Android. widget. textview;

Public class helloandroid extends activity {

@ Override

Public void oncreate (bundle savedinstancestate ){

Super. oncreate (savedinstancestate );

Textview TV = new textview (this );

TV. settext ("Hello, Android ");

Setcontentview (TV );

}

}

3) Run

ADT makes running very simple:

Select Run> Run.

Select "Android Application ".

(Hello world, see: http://androidappdocs.appspot.com/resources/tutorials/hello-world.html)

Appendix: Android SDK Release Number:

Android SDK 2.2 Revision 1 (May 2010) API level: 8 requires SDK tools R6 or higher. froyo

Android SDK 2.1 Revision 2 (May 2010) API level: 7 requires SDK tools R6 or higher. eclair

Android SDK 2.1 Revision 1 (Jan 2010) API level: 7 requires SDK tools R6 or higher. eclair

Android SDK 2.0.1 API level: 6 requires SDK tools R6 or higher. eclair

Android SDK 2.0 API level: 5 requires SDK tools R6 or higher. eclair

Android SDK 1.6 Revision 3 (May 2010) API level: 4 requires SDK tools R6 or higher. Donut

Android SDK 1.6 Revision 2 (Dec 2009) API level: 4 requires SDK tools R6 or higher. Donut

Android SDK 1.6 Revision 1 (SEP 2009) API level: 4 requires SDK tools R6 or higher. Donut

Android SDK 1.5 Revision 3 (Jul 2009) API level: 3 requires SDK tools R6 or higher. Cupcake

Android SDK 1.5 Revision 2 (May 2009) API level: 3 requires SDK tools R6 or higher. Cupcake

Android SDK 1.5 Revision 1 (API 2009) API level: 3 requires SDK tools R6 or higher. Cupcake

Android sdks 1.1 API level: 2

Android sdks 1.0 API level: 1

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.