Setting Up a Development Environment
Host System Setup
Introduction
This section provides instructions on how to configure your host system to build Android for mobile devices. While Android is designed as host-environment agnostic, it has been tested and is known to work on the following Linux operating system; Ubuntu 6.06 (Dapper), 7.10 (Gutsy), and 8.04. Cygwin is not recommended.
Installing Packages
Required Packages
Android requires the following system packages:
- flex: This lexical analyzer generator is used to read a given input file for a description of a scanner to generate.
- bison: This is a general-purpose parser generator.
- gperf: This is a perfect hash function generator.
- libesd0-dev: This enlightened sound daemon (dev files) is used to mix digitized audio streams for playback by a single device.
- libwxgtk2.6-dev: This package provides GUI components and other facilities for many different platforms.
- build-essential: This package contains a list of packages considered fundamental to building Debian packages.
Ubuntu 6.06 (Dapper)
On a clean Dapper system, type the following:
% sudo apt-get install flex bison gperf libesd0-dev libwxgtk2.6-dev zlib1g-dev
build-essential
This snippet includes an artificial line break to maintain a print-friendly document.
Ubuntu 7.10
- The libwxgtk2.6-dev package will only work if the following code is included in your /etc/apt/source file.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free license. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# Line commented out by installer because it failed to verify:
deb http://us.archive.ubuntu.com/ubuntu/ gutsy universe
# Line commented out by installer because it failed to verify:
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy universe
# Line commented out by installer because it failed to verify:
deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates universe
# Line commented out by installer because it failed to verify:
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates universe - Install required packages with the following command:
% sudo apt-get install flex bison gperf libesd0-dev libwxgtk2.6-dev zlib1g-dev
This snippet includes an artificial line break to maintain a print-friendly document.
build-essential -
Install the X11 development environment with the following commands:
% sudo apt-get install x-dev
% sudo apt-get install libx11-dev
% sudo apt-get install libncurses5-dev
Ubuntu 8.04
On a clean system, type the following:
% sudo apt-get install flex bison gperf libesd0-dev libwxgtk2.6-dev
zlib1g-dev build-essential
% sudo apt-get install x-dev
% sudo apt-get install libx11-dev
% sudo apt-get install libncurses5-dev
% sudo apt-get install sun-java5-jdk
Installing Java
Android source code includes a hard dependency on the Java Developer Kit (JDK) 5.0 Update 12 or greater. The specific file name of the Update 12 package is jdk-1_5_0_12-linux-i586.bin
. To download this version of the Java JDK:
- Navigate to: http://java.sun.com/products/archive/.
- Select '5.0 Update 12' from the 'Java 2 Platform Standard Edition (J2SE)' -> 'JDK/JRE - 5.0' field and click 'Go.'
- Click 'Download JDK.'
- In the 'Linux Platform' section, click 'Linux self-extracting file' associated with the jdk-1_5_0_12-linux-i586.bin package.
- Follow the installation instructions.
Once you have cleanly installed the JDK, modify your PATH environment variable to include
at its beginning so that Dapper will use the correct installation.
Ubuntu 7.10
An alternative method to quickly install Java is to enable multiverse repo in /etc/apt/sources.list
and then execute:
% sudo apt-get install sun-java5-jdk
0 komentar:
Posting Komentar