How to install the Android development tools
This document describes how to install and configure the Android development tools.
Table of Contents
Google provides tools to develop Android applications. You can choose between Eclipse or IntelliJ based tools.
This guide describes both approaches but the focus is on the Eclipse based tooling.
Development for Android can be done on a reasonably sized computer. For a nice experience a modern computer is recommended, for example a 2.6 GHz CPU with at least 8 GB of memory. An SSD speeds up the start of the Android emulator.
The Android SDK is 32bit, therefore on a 64bit Linux system you need to have the package
ia32-libs
installed. For Ubuntu you can do this via the following command.apt-get install ia32-libs
Please check your distribution documentation, if you are using a different flavor of Linux.
Google provides a packaged and configured Android development environment based on the Eclipse IDE called Android Developer Tools. Under the following URL you find an archive file which includes all required tools for Android development: Getting the Android SDK .
Extract the zip file and start the Android Developer Tools (Eclipse) which are located in the
eclipse
folder. You can do this, by double-clicking on the eclipse
native launcher (e.g. eclipse.exe
under Windows).
See Section 7, “Updating an Eclipse IDE for Android development” for a description how to update your existing Eclipse IDE to perform Android development.
The Android SDK Manager allows you to install specific versions of the Android API. Select
→ from the Eclipse menu or use the tools/android
program from your Android SDK installation.
The Android SDK Manager allows you to install and delete Android packages.
Select from the tree the version of Android you would like to develop for and press the API 16 version of Android.
button. The following screenshot shows the selection for the
Press the
button and accept the license for all packages. After the installation is completed, restart the Eclipse IDE.
In the Android SDK Manager select Extras and install the Android support library.
Android currently has several versions of the library, the v4, v7 and v13 version which are valid as of the respective API level of Android. The usage of a higher version of the support library is typically based on the lower version. For example the support for the action bar for Android devices with version API7 is included in the support library v7. This library requires also the v4 library.
In this exercise you create and start an AVD. Even if you have a real Android device available you should get familiar with the creation and usage of ADVs. Virtual devices give you the possibility to test your application for selected Android versions and a specific configuration.
Define a new Android Virtual Device (ADV) by opening the AVD Manager via
→ and by pressing the button.
Enter values similar to the following screenshot.
Afterwards press the
button. This will create the AVD configuration and display it under the list of available virtual devices.
Google also provides a modified version of the IntelliJ IDE called Android Studio for developing Android applications.
This tutorial uses Eclipse for its description but very similar functionality is available for Android Studio. Use Installing Android Studio to learn how to install and use it.
The following description assumes that you have already a flavor of the Eclipse IDE installed which you want to update to develop Android applications. Use the Eclipse update manager via
→ and start the android
to install all available components for the Android Development Tools (ADT) from the following URL:https://dl-ssl.google.com/android/eclipse/
After the new Android development components are installed, you will be prompted to install the Android SDK. You can use the following wizard or go to the next section to learn how to do it manually.
After the installation of the ADT the Eclipse tooling allows to download the Android SDK automatically. Alternatively you can also manually download the Android SDK from the Android SDK download page.
http://developer.android.com/sdk/index.html
The download contains a zip file, which you can extract to any place in your file system, e.g. on my Linux system I placed it into the
/home/vogella/android-sdks
folder. Avoid using spaces in the path name, otherwise you may experience problems with the usage of the Android SDK.
You also have to define the location of the Android SDK in the Eclipse Preferences. In Eclipse open the Preferences dialog via the menu
→ . Select Android and enter the installation path of the Android SDK.
No comments:
Post a Comment