Search

Android development tools installation

1. Installation of the Android development tools

Google provides tools to develop Android applications. You can choice between Eclipse or IntelliJ based tools.
This guide describes both approaches but the focus is on the Eclipse based tooling.

Tip

Selecting an IDE is primary based on personal preferences. The team at Google plans to support both the Eclipse as well as the IntelliJ based tools. The author of this text is a long term Eclipse user, contributor and committer and therefore selects Eclipse as his primary tooling for Android development.

2. Requirements

2.1. System requirements

Development for Android can be done on a reasonable 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. A SSD speeds up the start of the Android emulator.

2.2. Requirements for using a 64bit Linux

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.

3. Install Android Development Tools

3.1. Download packaged Android Developer Tools

Google provides a packaged and configured Android development environment based on the Eclipse IDE calledAndroid Developer Tools. Under the following URL you find an archive file which includes all required tools for Android development: Getting the Android SDK .

3.2. Standalone ADT installation

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).

3.3. Update an existing Eclipse IDE

See Section 7, “Updating an Eclipse IDE for Android development” for a description how to update your existing Eclipse IDE to perform Android development.

4. Install Android SDK version

4.1. Using the Android SDK manager

The Android SDK Manager allows you to install specific versions of the Android API. Select Window → Android SDK Manager from the Eclipse menu or use the tools/android program from your Android SDK installation.
Starting ADV Manager

Tip

If you used the packaged Android Development Tools download based on the Eclipse IDE, the Android SDK is located in the sdk folder of the extracted archive file.
The Android SDK Manager allows you to install and delete Android packages.
From the tree select the version of Android you would like to develop for and press the Install button. The following screenshot shows the selection for the API 16 version of Android.
Install Android API
Press the Install button and accept the license for all packages. After the installation is completed, restart the Eclipse IDE.

4.2. Install support library

In the Android SDK Manager select Extras and install the Android support library.

5. Exercise: Create and start Android Virtual Device

5.1. Target

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 so that you have the possibility to test your application with different Android versions and configurations.

5.2. Create AVD

Define a new Android Virtual Device (ADV) with open the AVD Manager via Window → Android Virtual Device Manager and press the New button.
Create a new AVD
Enter values similar to the following screenshot.
Settings for a new AVD

Tip

Ensure that the Use Host GPU option is selected. This makes the AVD use the graphical processing unit of your computer and this makes rendering much faster.
Afterwards press the OK button. This will create the AVD configuration and display it under the list of available virtual devices.

5.3. Start your AVD

Select your new entry and press the Start button. Select Launch in the following dialog.
Settings for a new AVD

Warning

Do not interrupt this startup process, as this might corrupt the AVD. The first startup may take on an older machine up to 10 minutes. On a modern machine is typically takes 1-3 minutes for a new AVD to start.
After the AVD started, you can use the AVD via the mouse. If you selected the option and via the virtual keyboard of the emulator.
Create a new AVD

Tip

Once started you don't stop the AVD. If you do changes in your application which you want to test, you deploy your application again on the running AVD.

6. Android Studio

6.1. Android Studio based on IntelliJ IDEA

Google also provides a modified version other IntelliJ IDE called Android Studio for developing Android applications.

6.2. Installation

This tutorial uses Eclipse for its description but very similar functionality is available for Android Studio. UseInstalling Android Studio to learn how to install and use it.

7. Updating an Eclipse IDE for Android development

7.1. Install ADT Plug-ins and Android SDK

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 Help → Install new software 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.
Wizard to install Android SDK - Part 1
Wizard to install Android SDK - Part 2
Wizard to install Android SDK - Part 3

7.2. Manual installation of the Android SDK

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 Window → Preferences. Select Android and enter the installation path of the Android SDK.
Setting up the Android SDK in the Eclipse Preferences

0 comments

Post A Comment