Pages

Sunday 14 October 2012

Beginning Android - Install an Android Platform

Google provides various Android platforms that can be installed via the SDK’s SDK Manager tool. Lesson 2 shows you how to use SDK Manager to install the Gingerbread platform (version 2.3.3) and platform tools.

Note Gingerbread is a code name for Android 2.3 and minor updates (e.g., 2.3.3). Google is in the habit of naming its platforms after dessert items.

Start the Android SDK Manager Application


Start SDK Manager (or android, which is one of the basic tools). After a few moments, you will see this application’s Android SDK Manager window with content similar to that shown in Figure

Android SDK Manager lets you install or remove Android platforms and other items.

Android SDK Manager presents a user interface organized into a menubar and a content area. The menubar presents Packages and Tools menus:
  • The Packages menu presents menuitems for displaying some combination of updated or new packages (Android components), installed packages, and obsolete packages. It also presents menuitems for sorting the list of packages by API level or repository, and for reloading the list of packages shown in the content area.
  • The Tools menu presents menuitems for managing Android Virtual Devices (device configurations that are run with the Android emulator) and add-on sites, for specifying options related to proxies (computers or applications that sit between networks as intermediaries) and other items, and presenting about information.
The content area presents the SDK’s path, a table of package information, checkboxes for determining what categories of packages to display, radio buttons for selecting how packages are sorted, buttons for installing and deleting packages, and a progress bar that displays the progress made by SDK Manager as it scans Google’s servers for package information (at startup and when Reload is selected from Packages).

Install Gingerbread 2.3.3 and Platform Tools


Uncheck Android 4.0.3 (API 15), which automatically unchecks all of the checkboxes underneath in its hierarchy. Instead, check Android 2.3.3 (API 10), which automatically checks all of the checkboxes underneath, and check Android SDK Platform-tools as well. You should end up with the user interface shown in Figure


Android SDK Manager’ s Install button reports that there are 22 packages to install.

The Install button identifies 22 packages to be installed. This count includes the Google USB Driver package in the Extras section (at the bottom of the window). You can uncheck this package if you don’t have an actual Android device and plan to do all of your development via the Android emulator. However, you might as well keep it checked.
Click Install and you will encounter Figure 4’s Choose Packages to Install dialog box.


 Green checkmarks appear beside those packages that will be installed.

The Choose Packages to Install dialog box presents a list of packages along with information about the highlighted package in the pane on the list’s right. The Accept and Reject radio buttons let you accept or reject the highlighted package. You can accept all packages by selecting the Accept All radio button.
The Accept button for a package with a green checkmark beside its name is selected. Neither the Accept nor Reject button is selected when a questionmark appears. This is certainly true for the Google USB Driver package. You will need to highlight this package and select its Accept radio button to ensure that it’s installed (assuming that you want to install this component).
Click Install to install all checked packages. Figure displays the Android SDK Manager Log window that appears over the Android SDK Manager window, and which provides installation details. It also shows a progress bar that reveals the amount of progress made in installing all selected packages.


Download progress appears on both the Android SDK Manager Log window and (at the bottom of) the Android SDK Manager window.

Figure includes a “Stopping ADB server failed (code -1).” message. ADB stands for Android Debug Bridge, which is a tool consisting of client and server programs that let you control and interface with your Android device. This message appears because the ADB server isn’t running at this point.
During installation, you will probably encounter Figure ADB Restart dialog box.


If you haven’t developed for Android before, the ADB server won’t be running and there’s no point in restarting it now. Therefore, click the No button.
After installation finishes, you’ll see a “Done loading packages.” message at the bottom of the Android SDK Manager and Android SDK Manager Log windows. Close Android SDK Manager Log.
Because Android SDK Manager’s user interface is somewhat buggy, its Install button continues to show that packages need to be installed. You can eliminate this confusion by unchecking and then checking both of the Updates/New and Installed checkboxes.
Figure shows the packages that should be installed. You don’t have to have the Google UDB driver installed unless you plan to install and test your apps on a real Android device.


Select the Installed checkbox to view only installed packages.

No comments:

Post a Comment