Previous  | Next  | Home

Installing the Software


 

Before we can proceed with Android development it is necessary to install the required software on our development computer.

 

Installing the Basic Software

The basic software components that will be required are the Java Development Kit (JDK), the Android Studio (AS) development environment, the Android Software Development Kit (SDK), and related libraries such as Google maps for special tasks. This software should work under Windows, Mac, or Linux, and is all free and can be downloaded from the Web. Install the required software using the instructions for your platform that may be found in the Install Android Studio document.


It may be necessary, or at least useful, to issue commands from a command line in installing and using the software, and if any debugging is required. The method to obtain a command prompt window depends on your operating system:

  • Typically for Linux, right-click on the desktop and select the appropriate command in the popup window (it is Konsole for my Fedora system; on other systems it might be Console or Terminal Window).

  • For a Mac, you need to execute the Terminal command, for example apple-command + space to get search, type in "terminal", and select the Terminal application that should come up in the list.

  • For Windows, it depends on the version. For Windows XP, go to the Start menu, then Run, and type cmd. For Windows Vista and Windows 7, hold down the shift key, right-click anywhere on the desktop, and select the Open Command Window Here option. For Windows 8, open the Apps screen (swipe up on touch screen or click the down arrow icon at the bottom of the screen and choose All Apps). Scroll to right, select Windows System > Command Prompt.

Once this software has been installed you should have the minimal installation capable of developing Android applications. However, there are some additional setup tasks that can optimize development workflow, and that may be required for particular applications.

 

Additional Useful Setup

It isn't essential but will be very convenient for later if you add the platform-tools subdirectory of the SDK to your path once installed, since this will permit you to execute Android tools such as the ADB (Android Debug Bridge) from any directory. Open a shell window in an arbitrary directory and type adb version. If it responds with a version number, you are good to go. If this command is not recognized, you need to set your path variable to include the Android tools directory.

The location of the Android SDK may be found under Tools > Android > Android SDK > Appearance and Behavior > Android SDK, and you need to set your path to include the platform-tools subdirectory of the SDK directory.

We now should have a basic Android development installation for the most current Android platform (e.g., Android 6.0). In the next section we describe how to add additional parts of the SDK (for example, other versions of Android).

 

Installing Specific Android Platforms

The SDK uses a modular structure that divides the major parts of the SDK into separately installable components. Types of components in the SDK repository include (see Exploring the SDK for more details):

In the development process, Android Studio will detect if additional pieces of the SDK are required and prompt you to install them, but you can also manage the SDK manually. To install additional components of the SDK:

  1. Open Android Studio.

  2. Select Tools > Android > SDK Manager.


  3. Alternatively, a stand-alone version of the SDK Manager can be launched by issuing the command android with no arguments in a shell window, assuming that the SDK tools directory is in your path; otherwise you will have to use the full path to the android command.


  4. The resulting window gives a list of installed and available tools and Android platforms:

You can use this manager to install or delete software by checking boxes and clicking the buttons. You will probably want to install the most recent version of the tools, and recent versions of Android (say Android 4.0 and above), but all versions stretching back to Android 2.1 are available if needed to program older devices. (A detailed list of Android versions with characteristics may be found at Build.VERSION_CODES.) For guidelines to which pieces of these installations are required, recommended, or optional, see Exploring the SDK.


With default options Android Studio will prompt when there are new tools or SDK version available for installation. It is normally good practice to keep your installation up to date by accepting these installations.

 

And We are Ready to Go!

Close the Android SDK Manager window once you are finished installing software. You should now have all the components required to begin developing an Android application. A good way to test your installation is to install and run a sample Android package, as described in the next section.

Last modified: June 8, 2016


 Previous  | Next  | Home