在Ubuntu14.04上编译Android4.0.1出现的几个问题
一. 工具
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- Import includes file: out/target/product/mx3/obj/STATIC_LIBRARIES/libwebcore_intermediates/import_includes
- target Generated: libwebcore <= external/webkit/Source/WebCore/css/tokenizer.flex
- <span style="rgb(255, 255, 51);">Can't locate Switch.pm in @INC (you may need to install the Switch module)</span> (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
- BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
- Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
- BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
- make: *** [out/target/product/mx3/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/html/DocTypeStrings.cpp] Error 2
- make: *** Waiting for unfinished jobs....
- make: *** [out/target/product/mx3/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/platform/ColorData.cpp] Error 2
- target Generated: libwebcore <= external/webkit/Source/WebCore/html/parser/HTMLEntityNames.in
解决方法是安装perl的switch库:
- sudo apt-get install libswitch-perl
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出现的几个问题的更多相关文章
- 【转】Linux(ubuntu14.04)上编译Android4.4源码的环境搭建及编译全过程
原文网址:http://jileniao.net/linux-android-building.html sublime text让我伤心.本来很信任sublime text的自动保存功能,之前使用一 ...
- 在ubuntu14.04上编译android4.2.2系统
原创作品,转载请注明出处,严禁非法转载 copyright:weishusheng 2015.8.1 时下android系统非常流行,下面就来说一下,下载编译一个andro ...
- 在Ubuntu Server14.04上编译Android6.0源码
此前编译过Android4.4的源码,但是现在Android都到了7.0的版本,不禁让我感叹Google的步伐真心难跟上,趁这周周末时间比较充裕,于是在过去的24小时里,毅然花了9个小时编译了一把An ...
- ubuntu14.04上编译安装python3.7.3
首先先去python官网www.python.org下载python3.7.3的官方压缩包Python-3.7.3.tgz 一.先安装需要的包zlib1g,libffi apt-get update ...
- Ubuntu14.04 Chromium 编译
1.下载depot_tools: 首先安装 git-core: sudo apt-get install git-core 执行命令: git clone https://chromium.googl ...
- ubuntu14.04下编译安装ambari-2.4.2.0
ubuntu14.04下编译安装ambari-2.4.2.0 编译前的准备工作 准备工作有: 系统参数 系统依赖(编译环境) 离线安装包 java环境 maven环境 Nodejs环境 git环境 a ...
- [译]How to Install Node.js on Ubuntu 14.04 如何在ubuntu14.04上安装node.js
原文链接为 http://www.hostingadvice.com/how-to/install-nodejs-ubuntu-14-04/ 由作者Jacob Nicholson 发表于October ...
- 【转】基于Ubuntu 14.04 LTS编译Android4.4.2源代码
原文网址:http://blog.csdn.net/gobitan/article/details/24367439 基于Ubuntu 14.04 LTS编译Android4.4.2源代码 ...
- Ubuntu14.04+eclipse下cocos2d-x3.0正式版环境的搭建
环境: ubuntu14.04 adt-bundle-linux-x86_64 android-ndk-r9d-linux-x86_64 cocos2d-x-3.0正式版 apache-ant 1.9 ...
随机推荐
- cc(self)是什么意思?
分别找到这2句代码: 复制代码 cc(self):addComponent("components.behavior.EventProtocol"):exportMethods ...
- zookeeper的原理讲解
留着以后看:http://blog.csdn.net/u010311445/article/category/1677839
- pyspark实现自动提示以及代码高亮
pyspark实现自动提示以及代码高亮 起因 打开pyspark发现啥提示都没有,太不友好了啊,然后忍不住谷歌了一下,发现了这篇文章,内容如下: 1.pip install ptpython; 2.e ...
- 【Miktex】使用教程以及数学符号整理总结
LaTeX是当今世界上最流行和使用最为广泛的 TeX格式.它构筑在 Plain TeX的基础之上,并加进了很多的功能以使得使用者可以更为方便的利用 TeX的强大功能.使用 LaTeX基本上不需要使用者 ...
- pandas的连接函数concat()函数
pd.concat(objs, axis=0, join='outer', join_axes=None, ignore_index=False, keys=None, levels=No ...
- egret list不显示问题
1.循环滚动 2.单格滚动 不太清楚是把哪个约束勾上了,结果一直不显示,折腾了许久. 另外也不要把下面的这个约束勾上,否则不能滑动.
- 迭代器模式和组合模式(head first设计模式——8)
把迭代器模式和组合模式放在同一篇的原因是其联系比较紧密. 一.迭代器模式 1.1迭代器模式定义 迭代器模式提供一种方法顺序访问一个聚合对象中的各个元素,而不是暴露其内部的表示. 这个模式提供了一种方法 ...
- setOnPageChangeListener 过时了怎么办?
今天使用ViewPager发现setOnPageChangeListener的方法竟然过期了.并且AS编译不通过了,最后查了一下原来把set换成add了,代码例如以下: setOnPageChange ...
- C语言 · 成绩查询系统
抱歉,昨天忘了往博客上更新,今天补上. 成绩查询系统 分值: 21 数学老师小y 想写一个成绩查询系统,包含如下指令: insert [name] [score],向系统中插入一条信息,表示名字为na ...
- 利用jQuery中live为动态生成Dom添加datepicker效果
利用Live属性,focus时重新绑定控件 $(".datepickerDom").live("focus", function () { $(this).da ...