接下来,如果是32位系统的话,在终端中运行
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \ libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \ libxml2-utils xsltproc
如果是64位,运行
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \ x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \ libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \ libxml2-utils xsltproc
需要JDK 1.6
sudo apt-get install openjdk-6-jdk
sudo apt-get install build-essential
sudo apt-get install bison
/usr/bin/ld: cannot find -lz
sudo apt-get install zlib1g-dev
/bin/bash: flex: command not found
sudo apt-get install flex
/usr/bin/ld: cannot find -lncurses
sudo apt-get install libncurses5-dev
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror]
<built-in>:0:0: 附注: 这是先前定义的位置
cc1plus:所有的警告都被当作是错误
Ubuntu 11.10的gcc版本是4.6.1,版本太高,编译Android时出错,要把gcc版本改为4.4.6
sudo apt-get install gcc-4.4
sudo apt-get install g++-4.4
修改/usr/bin下gcc和g++的链接