标签:des android style blog http color io os ar
一. 工具
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
二.JDK
oracle 官网下载JDk6_29(bin文件,注意安装方法,环境变量,update-alternative等) http://www.oracle.com/technetwork/java/javase/archive-139210.html
三.gcc/g++的版本
默认的gcc g++版本为4.6.3, 将其改为4.4.步骤:
sudo apt-get install gcc-4.4
sudo apt-get install g++-4.4
cd /usr/bin
ls -l gcc*
sudo mv gcc gcc.bak
sudo ln -s gcc-4.4 gcc
ls -l g++*
sudo mv g++ g++.bak
sudo ln -s g++-4.4 g++
gcc -v
g++ -v
四.源的问题
另外。init的时候用这个:
repo init -u git://git.omapzoom.org/platform/manifest -b android-4.0.1_r1
2.dalvik/vm/native/dalvik_system_Zygote.cpp:216:43: error: ‘setrlimit’ was not declared in this scope
err = setrlimit(contents[0], &rlim);
^
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
dalvik/vm/native/java_lang_Float.cpp:1:0: note: this is the location of the previous definition
/*
^
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libdvm_intermediates/native/dalvik_system_Zygote.o] Error 1
make: *** Waiting for unfinished jobs....
解决办法
添加头文件#include <sys/resource.h>到以下文件
dalvik/vm/native/dalvik_system_Zygote.cpp
3.host Executable: emulator_renderer (out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/emulator_renderer)
/usr/bin/ld:
out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/main.o:
undefined reference to symbol ‘XInitThreads‘
//usr/lib/i386-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/emulator_renderer] Error 1
make: *** Waiting for unfinished jobs....
解决办法:
修改development/tools/emulator/opengl/host/renderer/Android.mk文件
root@ubuntu:/home/dzt/android/WORKING_DIRECTORY# ls
abi cts docs frameworks Makefile prebuilt
bionic dalvik download.sh hardware ndk sdk
bootable development download.sh~ hs_err_pid6190.log out system
build device external libcore packages v8.log
root@ubuntu:/home/dzt/android/WORKING_DIRECTORY# gedit development/tools/emulator/opengl/host/renderer/Android.mk
添加一行:LOCAL_LDLIBS += -lX11 注意最好是复制过去,右边的容易写错
在Ubuntu14.04上编译Android4.0.1出现的几个问题
标签:des android style blog http color io os ar
原文地址:http://www.cnblogs.com/kobe8/p/3998379.html