Did you install python
Initializing a Build Environment
The "Getting Started" section describes how to set up your local work environment, how to use Repo to get the Android files, and how to build the files on your machine. To build the Android source files, you will need to use Linux or Mac OS. Building under Windows is not currently supported.
Note: The source is approximately 2.6GB in size. You will need 10GB free to complete the build.
For an overview of the entire code-review and code-update process, see Life of a Patch.
To see snapshots and histories of the files available in the public Android repositories, visit the GitWeb web interface.
Setting up a Linux build environment
The Android build is routinely tested in house on recent versions of Ubuntu (10.04 and later), but most distributions should have the required build tools available. Reports of successes or failures on other distributions are welcome.
Note: It is also possible to build Android in a virtual machine. If you are running Linux in a virtual machine, you will need at least 8GB of RAM/swap and 12GB or more of disk space in order to build the Android tree.
In general you will need:
Python 2.4 -- 2.7, which you can download from python.org.
JDK 6 if you wish to build Gingerbread or newer; JDK 5 for Froyo or older. You can download both from java.sun.com.
Git 1.5.4 or newer. You can find it at git-scm.com.
(optional) Valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc. Download from valgrind.org.
Detailed instructions for Ubuntu 10.04+ follow.