准备工作:
sudo apt-get install build-essential
sudo apt-get install make
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install libc6-dev
sudo apt-get install patch
sudo apt-get install texinfo
sudo apt-get install libncurses-dev
sudo apt-get install git-core gnupg
sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl
sudo apt-get install ncurses-dev
sudo apt-get install zlib1g-dev
sudo apt-get install valgrind
sudo apt-get install python2.5
安装 Java jdk( ubuntu12.04自带了java6)
然后执行编译脚本./build-android
编译过程中出现了这个错误:
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] 错误 1
原因和方法如下(参考别人解决的):
原因:Ubuntu 11.10的gcc 4.6版本太高了,android编译需要gcc 4.4
解决办法:更换gcc、g++版本4.6为4.4
sudo apt-get install gcc-4.4
sudo apt-get install g++-4.4
sudo rm -rf /usr/bin/gcc /usr/bin/g++
sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.4 /usr/bin/g++
问题2:
g++: 错误: –fpermissive:没有那个文件或目录
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] 错误 1
解决办法:sudo apt-get install g++-4.4-multilib
以上为自己编译过程遇到的问题总结网上得到的。