This lesson describes the basic steps you need to follow in order to start up as an Android developer using a PC with the Linux operating system.
System configuration information and screen captures are provided.
The steps are set out in chronological order, first determining the software requirements and then setting up your system.
You will need a PC that has the following software installed:
• 32-bit installation, or a 64-bit linux distribution that has a 32-bit compatibility layer • 2.4.x or later kernel • glibc 2.3.2 or later X11R5 capable Xserver running locally on a 24-bit display • compositing window manager (optional - required for alpha-blended window shapes) • gtk/gdk/glib (optional - required for native theme support) • pango/xft (optional - required for pdf printing, anti-aliased text and unicode font support) • lcms (optional - required for color profile support in JPEGs and PNGs) • gksu (optional - required for elevate process support) • mplayer (optional - required for video playback) • esd (optional - required for audio playback)
The easiest way to install the Java SDK is through the terminal. Open a new terminal window and type the following command:
sudo apt-get install openjdk-7-jdk
Now press return.
NOTE: During the installation it may ask you for your password.
This is perfectly normal and part of the installation process.
If you do not have the Android SDK installed, then you can download it from: http://developer.android.com/sdk/index.html.
NOTE: It is recommended to select the “SDK Tools” only download option.
Navigate to the download link that is specific to your hardware platform.
Extract the contents of the downloaded Android SDK to a directory of your choosing.
Navigate to your Android SDK Directory and then to the 'Tools Directory'.
Run the item named android.
This launches Android SDK and AVD Manager
The Android Package Installer lets you select the packages you would like to install in your Android development environment.
NOTE: Very old versions of Android are not supported and the very latest versions of Android may not be supported.
Ensure that you install the SDK Platform Android 2.2, API 8 with revision 2 (or later revision) package.
NOTE: There is a known “black screen” issue when deploying certain stacks to a simulator running Android 2.2, API 8 with revision 2.
If you experience this issue please create and use an newer Android revision AVD (e.g. 4.1)
After the Android SDK and AVD Manager has completed installing the selected packages, you should find that the status of packages has changed from Not Installed to Installed.
Once you have installed the required packages, you can use the Android SDK and AVD Manager to set up a virtual device that can be used in your development environment.
This allows you to test your applications without requiring a physical Android device.
You can set up a virtual device as follows:
You can launch the emulator by highlighting the virtual device you created and selecting Start… .
In addition to setting up virtual devices, it is possible to set up physical devices.
These devices can be accessed after they have been appropriately configured for debugging.
Install the appropriate device drivers for the devices you would like to use. Details of how to do this can be found at the Android Developer Website.
The relevant device must be set to debug mode, once the necessary drivers are installed: