Android SDK 2.2 Development Environment setup

Source: Internet
Author: User

(1) installation is required. (The following are the necessary software and tools for Android development)
1.1 install JDK.
Android currently supports the following JDK versions:
Jdk1.5, jdk1.6
If not installed, you can download it from the official website:
Http://www.oracle.com/technetwork/java/javase/downloads/index.html
After the download, click Install. This document uses JDK 1.6.0 _ 18.
1.2 install eclipse.
Android currently supports at least the following eclipse versions:
Ganymede (3.4), Galileo (3.5), Helios (3.6)
If not installed, you can download it from the official website:
Http://www.eclipse.org/downloads/
After the download, decompress the package to use it. This article uses Helios (3.6)
1.3 install the android SDK.
The latest version is: SDK 2.2
If not installed, you can download it from the official website:
Http://developer.android.com/sdk/index.html
Click android-sdk_r06-windows.zip
After the download, decompress the package directly. Example: e:/Android/android-sdk_r06-windows

(2) install the Developer Tools plug-in. (Make sure the current network is connected because you need to download it online)
2.1 Open eclipse and choose help> install new software ....

2.2 The "available software" dialog box is displayed. Click "add.

2.3 The "add repository" dialog box is displayed.
Name: Android
Enter: https://dl-ssl.google.com/android/eclipse/ in location
Click "OK.

2.4 In this case, eclipse searches for resources of the specified URL. If the search result is correct, the: Developer Tools check box is displayed. Select this check box. Click "Next.

2.5 The "Install details" dialog box is displayed. Click "Next.

2.6 The review licenses dialog box appears. Select the I accept the terms of the license agreements check box. Click "finish.

2.7 In the "installing software" dialog box, download resources.

2.8 The "Security Warning" dialog box may appear during the download process. Do not worry about clicking the "OK" button to continue the installation.

2.9 After the download is complete, the "Software Updates" dialog box is displayed. Click "restart now" to restart eclipse.

(3) install the complete Android SDK. (The SDK downloaded on the official website is only a framework and is not a complete development kit. Therefore, you need to download the complete SDK)
3.1 select Window> preferences from the menu.

3.2 The "Preferences" dialog box appears. The "android SDK location" dialog box may pop up immediately.

3.3 turn off the above error dialog box, enter: e:/Android/android-sdk_r06-windows In SDK location, click the "OK" button.

3.4 choose Window> Android SDK and AVD manager.

3.5 The "android SDK and AVD manager" dialog box is displayed. Select "available packages" and click "+" to expand the options. Select four options for "API 8. Click "Install selected.

3.6 The "choose packages to install" dialog box is displayed. Select "accept all" and click "Install.

3.7 The "installing archives" dialog box is displayed. The time required for this process depends on the speed of the network. If the bandwidth is MB, the download speed is about 80 kib/s.

3.8 After the download is complete, the "ADB restart" dialog box may pop up and click "yes.

3.9 after installation, click "close" to close the window.

3.10 if you are not sure whether the four packages have been correctly installed, select "installed packages" in the "android SDK and AVD manager" dialog box to view the installed software packages.

(4) Create an AVD. (Android Virtual Devices = AVD, an android virtual device, or a simulator commonly used in Embedded Development)
4.1 If the SDK is correctly installed, select "Virtual Devices" in the "android SDK and AVD manager" dialog box and click "new.

4.2 The create new Android Virtual Device (AVD) dialog box is displayed. Enter Android-AVD in name and select Android 2.2-API Level 8 in target.
For other options, click "create AVD.

4.3 If the installation is successful, it will be displayed in the "android SDK and AVD manager" dialog box.

(5) Create an android project. (Create an android program to verify that the development environment is successfully set up)
5.1 In eclipse, choose File> New> project ....

5.2 The "new project" dialog box is displayed. Select Android> Android project and click "Next.

5.3 The "new Android project" dialog box is displayed.
Input: hello in project name
Select: Android 2.2 check box in build target
In the APPICATION Name field, enter hello_android.
Enter com. Android. Test in package name.
Enter helloandroid in create Activity
Click "Next.

5.4 "new Android test project" is displayed. because it is a small demonstration project, you do not need to create a test project. Click "finish.

5.5 edit the helloandroid. Java file.
Package com. Android. test;

Import Android. App. activity;
Import Android. OS. Bundle;
Import Android. widget. textview;

Public class helloandroid extends activity {
/** Called when the activity is first created .*/
@ Override
Public void oncreate (bundle savedinstancestate ){
Super. oncreate (savedinstancestate );
Textview = new textview (this );
Textview. settext ("Hello android! ");
Setcontentview (textview );
}
}

(6) run the android project. (Next is the time to witness the miracle ~)
6.1 After editing the helloandroid. Java file, you can run it to check the effect.
Click the run button on the toolbar or choose run> run from the menu. The "Run as" dialog box is displayed. Select "Android Application" and click "OK.

The loading speed of 6.2 AVD is a little slow and you need to wait patiently.

6.3 wait a few minutes and the android standby interface will appear.

6.4 then the project is automatically run and the effect is displayed. If "Hello Android!" is displayed !" It indicates that the operation is correct.

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.