Thứ Sáu, 25 tháng 4, 2014

Android SDK [Getting Started with Android Programming]

The first and most important piece of software  you need to download is, of course, the AndroiSDK. The Androi SDK contain a debugger libraries an emulator, documentation, sample codeand tutorials.

You can download the Androi SDK from http://developer.android.com/sdk/index.html (see Figure 1-8).


FIGURE 1-8

The Androi SDK is package in a zip file. You can download it and unzip its conten (the android-sdk-windows folder) into a folder, say C:\Android 4.0\. For Window user, Google recommends that you download the installer_r15-windows.exe file instead and use it to set uthe tools for you automatically. The following steps walk you through the installation process usinthis approach.

Installing the Android SDK Tools

When you have downloaded the installer_r15-windows.exe file, double-click  it to start the installation of the Androi tools. In the welcome screen of the Setup Wizard click Next to continue.

If your computer does not have Java installed you will see the error dialog shown in Figure 1-9However even if you have Java installed you may still see this error If this is the case, click the Repor error button and thenclick Next.


FIGURE 1-9

You will be asked to provide a destination folder to install the Androi SDK tools. Enter a destination path (see Figure 1-10) and click Next.

When you are asked to choose a Start Menu folder to create the programs shortcut, take the defaulAndroid SDK Tools”  and click Install. When the setup is done, check the “Star SDK Manager (to download system images,etc.) option  and click Finish (see Figure 1-11). This will start the SDManager.


FIGURE 1-10


FIGURE  1-11

Conguring the Android SDK Manager

The Androi SDK Manager manages the various versions of the Androi SDK currentl installed on your computer. When it is launched, you will see a list of items and whether  or not they are currentl installed on yourcomputer (see Figure 1-12).

Check the relevant tools, documentation, and platforms you need for your project.  Once you have selected the items you want,  click the Install button to download them. Because it takes a while
to download from Googles server, it is a good idea to download only what you need immediately, and download the rest when you have more time. For now, you may want to check the items shown in the figure.


FIGURE 1-12

Each version of the Androi OS is identified by an API level number For example, Androi 2.3.3 is level 10 (API 10), while Androi 3.0 is level 11 (API 11), and so on. For each level, two platforms aravailable For example, level 14offers the following:

  SDK Platform

  Google APIs by Google Inc.

The key difference between the two is that the Google APIs platform contain additional APIs provide by Google (such as the Google Maps library) Therefore if the application you are writing requires Google Maps you need tocreate an AVD using the Google APIs platform (more on this is provide in Chapter 9, Location-Based Services.

You will be asked to choose the packages to install (see Figure1-13). Check the Accept All option and click Install.


FIGURE 1-13

The SDK Manager will proceed to download the packages that you have selected. The installation takes some time, so be patient When all the packages are installed you will be
asked to restar the ADB (Androi Debug Bridge). Click Yes.

Không có nhận xét nào:

Đăng nhận xét