0. # sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
//you must install most of them, if you are not sure which application you do not need, just copy the command above.
1.not use "sudo make",just "make"
//if you use "sudo make",there will be several additional build error, such as java version not match...
2.if permission denied,just chwon,e.g. your username is "philander"
# sudo chown -R philander android
//-R或-recursive:递归处理,将指定目录下的所有文件及子目录一并处理
and then use
# make
3. install jdk5 update12 or higher
4. install gcc-4.3
install g++-4.3
//GCC在4.4時把部份string相關的function回傳值的type改變了...
//char*改成了const char*...
//也因此讓一堆原本不是針對最新的gcc來寫的code都無法編譯成功
# cd /usr/bin
//建个软连接
# ln -sf gcc-4.3 gcc
# ln -sf g++-4.3 g++
//you can use cmd like "ls gcc* -ll" to check gcc version