Open a terminal, and execute the following command:
1 2 3 | $ sudo apt-get install build-essential g++-multilib libc6-dev lib32ncurses5 lib32ncurses5-dev lib32z1 flex bison gperf curl zlib1g zlib1g-dev openjdk-7-jdk tofrodos libxml2-utils |
When you finish installation of dependent tools,you can try to build Android source code to check the environment is okay or not.