Development of Android applications with Eclipse (part 2)

Installation of Android SDK

Aldeniz Rashidov, www.aldeniz.eu

 

In this section, I will introduce you how to install the Android Application Development Toolkit (Android SDK) in Eclipse under Windows OS. Eclipse is an integrated development environment, which used to develop Android and Java applications and provides the ability to create, compile, and set up Java programming code.

A. Installation of Android SDK through Eclipse

1. Choice of option Install new SDK in dialog window, which visualize after successfully installation of Eclipse IDE (fig. 1). It is necessary setup folder for installation of Android SDK. Button Finish start processing of installation on last SDK version. In case that SDK installed, in filed Existing Location, you can set base folder.

Fig. 1. Installation of Android SDK

2. Choice of the base (required and mandatory) packages on Android SDK for installation and accept of the license agreements (fig. 2). The button Install chooses next step at process of installation.

Fig. 2. Choice of the base (required and mandatory) packages by Android SDK

3. Choice of additional packages of SDK for installation (fig. 3 and fig. 4). Notice for installing these packages is generate from installation process, because there are necessary for developing and testing Android applications (fig. 3).

Fig. 3. Notice for installation of additional packages of SDK

Fig. 4. Choice of additional packages for installation

In case of you skip to select these packages and closes the reminder window, you can later use the option Android SDK Manager from menu Windows of Eclipse to continue. The additional packages are important at developing and testing of the Android applications and without them practically is not possible to continue.

Figure 5 shows packages, which provides features for development of application for versions 7.1.1, 7.0 and 5.0.1 of Android.

The base package in each separate version, which provides development of applications, is SDK Platform. When developing apps for different versions of Android, you need to select the appropriate package of SDK Platform for the version you want. It is recommended to add an SDK platform for some older versions of Android, such as 5.0.1 (API 21).

Here is a preview of the more important features of some versions:

  • API 25 (Android 7.1.1)
    – New Professional Emoji; Round Icon Resources; Improved VR Thread Scheduling; Image Keyboard Support.
  • API 24 (Android 7.0)
    – Multi-window Support; Notification Enhancements; Multi-locale Support; More Languages.
  • API 23 (Android 6.0)
    – Runtime permissions; Doze mode and App Standby; Text Selection; BoringSSL; APK Validation.
  • API 21 (Android 5.0)
    – Massive changes; Material design style; Screen capturing and sharing; Multiple network connections.
  • API 19 (Android 4.4)
    – New NFC smart card capabilities; Printing framework; Storage access framework; New ways to build beautiful apps; Screen recording.
  • API 18 (Android 4.3)
    – Notification Listener; Contacts Provider; Restricted Profiles; Solution for digital rights management (DRM); Rotation animations.
  • API 14 (Android 4.0)
    – Spell Checker Services; Text-to-speech Engines; Social APIs in Contacts Provider; Voicemail Provider; Android Beam (NDEF Push with NFC); GridLayout, Popup menus.
  • API 11 (Android 3.0)
    – Native Fragments & Action Bar; Drag and drop; Split touch events; WebViewFragment; JSON utilities.

The Google APIs package, at each separate versions, provides integration of the applications with Google services. Google USB Driver is use at debugging of Google Nexus devices. Android Support Repository provides important additional functions at application development. Google Play services integrate functions for work with Google Maps, Google+ etc.

Some of the packages (images) are used for debugging of application with the Android emulator:

  • Android TV ARM EABI v7a System Image;
  • Android TV Intel x86 Atom System Image;
  • Android Wear ARM EABI v7a System Image;
  • Android Wear Intel x86 Atom System Image;
  • ARM EABI v7a System Image;
  • Intel x86 Atom_64 System Image;
  • Intel x86 Atom System Image.

In case of you will start the emulator on PC with AMD CPU and will developed application for phone or tablet then can choice package ARM EABI v7a System Image. If you use PC with Intel CPU and will developed application for phone or tablet then can choice packageIntel x86 Atom_64 System Image or package Intel x86 Atom System Image.

Fig. 5. Recommended packages for installation

When you use Intel x86 Atom_64 System Image or Intel x86 Atom System Image is necessary to add the package Intel x86 Emulator Accelerator (HAXM installer) (fig. 6). Otherwise, with this image, the emulator will not be start. Choosing and downloading of package will not installed HAXM. To be use HAXM you must install it from folder extras (

{SDK_FOLDER}\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm.exe) of Android SDK.

Fig. 6. Package Intel x86 Emulator Accelerator (HAXM installer)

When SDK Manager for any reason does not allow you to download this package, you may use an address https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager-end-user-license-agreement from site of Intel® with resources for Android (Intel® Hardware Accelerated Execution Manager, https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager?page=3 ). The package is archived (haxm-windows_v6_1_1.zip), and must be extracted in some folder and then installing with intelhaxm-android.exe.

When is not possible starting the emulator withIntel x86 Atom_64 System Image or Intel x86 Atom System Image on PC with Intel CPU you can be use package (image) for AMD CPU, which is more slowly by speed in this case.

Option to startup Emulator without use the Intel x86 Emulator Accelerator package is only available when if from command prompt (console) in tools folder of SDK run:

C:\Users\IEUser\android-sdks\tools> emulator -avd name -memory 512 -no-accel -gpu off

name is name of Android Virtual Device (AVD), which you created in AVD Manager (Windows menu of Eclipse).

You can use this option if your computer or system does not support virtualization, or when using the emulator via VMware or Virtual Box.

4. Accepting of license agreement for installation of additional packages (fig. 7). The button Install choose the next step at process of installation.

Fig. 7. Accepting of license agreement for installation of packages

B. Self-install of Android SDK

1. Download of Android SDK from https://developer.android.com/studio/index.html (fig. 8 и fig. 9).

Fig. 8. Download of Android SDK for specific OS version

Fig. 9. Download of Android SDK for specific version and accepting of license agreement

2. Creating of base folder on Android SDK (for example c:\eclipse\android-sdk) (fig. 10)

Fig. 10. Creating of base folder on Android SDK

3. Creating of folder tools into the base folder on Android SDK (c:\eclipse\android-sdk\tools) (fig. 11).

Fig. 11. Creating of folder tools into the base folder on Android SDK

4. Opening downloaded file tools_r25.2.3-windows.zip and extract it in folder tools on Android SDK (fig. 12).

Fig. 12. Opening downloaded file tools_r25.2.3-windows.zip

5. Execution of the file android.bat from folder tools, which will install Android SDK in console mode (fig. 13).

Fig. 13. Installation of SDK from console

6. Installation of additional packages from Android SDK Manager, which is open automatically at process of installation (fig. 14). You can use the instructions for installing packages from SDK Manager in p. 3.

Fig. 14. Installation of packages from Android SDK Manager

7. Starting of Eclipse and choosing of option Use Existing SDKs in dialog window, which visualize after successfully installation of Eclipse IDE (fig. 1). In filed Existing Location, you can set base folder of Android SDK, which created in p. 2.

If the dialog box not appear, the location of the SDK is setting by using the option Preferences from Windows menu of Eclipse. Then choose the location of the Android SDK in the SDK Location field of the Android menu (fig. 15).

Fig. 15. Setup location of Android SDK

LEAVE A COMMENT