编译Android2.2源码(1)
来源:互联网 发布:货到付款的淘宝网 编辑:程序博客网 时间:2024/05/16 00:29
参考文档
1.http://blog.csdn.net/ameyume/article/details/14452245
2.http://www.cnblogs.com/pengwang/p/3225444.html
3.http://blog.csdn.net/lxc1014/article/details/8985126
4.http://www.jianshu.com/p/b5513a2edc9b
5.http://blog.csdn.net/sidely/article/details/40341463
6.http://www.th7.cn/Program/Android/201504/441928.shtml
下面为编译步骤:
1.运行 “. build/envsetup.sh”命令(.后面有一个空格);
2.运行“choosecombo”命令;
出现了一个错误:/bin/bash: bison: 未找到命令
参考文档1,得到了解决,需要安装bison工具;
apt-get install bison
3.运行make init“命令;
出现错误:/bin/bash: g++: 未找到命令
需要安装g++工具;
apt-get install g++
感觉就是,出现这个问题”/bin/bash: ***: 未找到命令“,可以直接通过"apt-get inatall ***"命令安装工具;然后重新开始。
4.运行”make app_process“命令;
5.运行”make“命令,编译整个系统;
1)出现错误:external/clearsilver/cgi/cgi.c:22:18: fatal error: zlib.h: 没有那个文件或目录
参考文档1,apt-get install zlib1g-dev
2)出现错误:make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/AaptAssets.o] 错误 1
参考文档2,解决办法: frameworks/base/tools/aapt/Android.mk
应为ubuntu中没有vim编辑器,使用apt-get install vim安装了以下vim,在Android.mk文件中添加了”-fpermissive“。
3)出现错误:make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/AssetManager.o] 错误 1
参考文档2,
4)出现错误:/bin/bash: flex: 未找到命令
参考文档1: apt-get install flex
5)出现错误: make: *** [out/host/linux-x86/obj/EXECUTABLES/grxmlcompile_intermediates/grxmlcompile.o] 错误 1
参考文档2,
wget "https://github.com/CyanogenMod/android_external_srec/commit/4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff"
patch -p1 < 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
rm -f 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
cd ../..
这里应该是下载一个补丁,然后打上补丁,删除。
6)出现错误:collect2: ld returned 1 exit status;网上搜索到的资料说是,因为gcc,g++两个工具版本过高导致的
参考文档3,对gcc,g++两个工具进行了降级处理;
然而,并没有什么卵用;继续搜索资料。。。。。
下面是具体的错误日志:
target Prebuilt: (out/target/product/generic/system/bin/monkey)
target Prebuilt: (out/target/product/generic/system/etc/security/cacerts.bks)
target Prebuilt: (out/target/product/generic/system/usr/share/bmd/RFFspeed_501.bmd)
target Prebuilt: (out/target/product/generic/system/usr/share/bmd/RFFstd_501.bmd)
host Executable: adb (out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)
/usr/bin/ld: 找不到 -lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] 错误 1
参考文档4,在文档中搜索关键字”adb_intermediates/adb“,发现搜索到了2处:
提示(1),提示(2);提示1说我没有安装”zlib1g-dev“工具,但是这个工具我安装了,经过查看/usr/bin,还有上面的步骤;我按照提示2,安装了libncurses5-dev:i386工具,解决了这个问题。
apt-get install libncurses5-dev:i386
7)出现错误:
In file included from external/qemu/android/skin/window.c:19:
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55: fatal error: X11/Xlib.h: 没有那个文件或目录
compilation terminated.
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/android/skin/window.o] 错误 1
参考文档5,给出了解决方案:
apt-get install libx11-dev
8)出现错误:
Generating CSSPropertyNames.h <= CSSPropertyNames.in
sh: 1: gperf: not found
calling gperf failed: 32512 at ./makeprop.pl line 96.
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h] 错误 25
make: *** 正在删除文件“out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h”
参考文档5,给出了解决方案:
apt-get install gperf
9)出现错误:
Can't locate Switch.pm in @INC
[make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLNames.h] Error 2]
参考文档6:
apt-get install libswitch-perl
至此,android2.2源码应该是编译完成了,该进行下一步操作了。
target Non-prelinked: libicudata-large (out/target/product/generic/symbols/system/lib/libicudata-large.so)target Non-prelinked: libjnitest (out/target/product/generic/symbols/system/lib/libjnitest.so)target Non-prelinked: libplatform_library_jni (out/target/product/generic/symbols/system/lib/libplatform_library_jni.so)target Non-prelinked: libsampleplugin (out/target/product/generic/symbols/system/lib/libsampleplugin.so)target Non-prelinked: libsimplejni (out/target/product/generic/symbols/system/lib/libsimplejni.so)target Non-prelinked: libtestplugin (out/target/product/generic/symbols/system/lib/libtestplugin.so)target Non-prelinked: libwnndict (out/target/product/generic/symbols/system/lib/libwnndict.so)target Non-prelinked: lights.mahimahi (out/target/product/generic/symbols/system/lib/lights.mahimahi.so)target Non-prelinked: sensors.mahimahi (out/target/product/generic/symbols/system/lib/sensors.mahimahi.so)target Non-prelinked: sensors.sapphire (out/target/product/generic/symbols/system/lib/sensors.sapphire.so)target Non-prelinked: sensors.trout (out/target/product/generic/symbols/system/lib/sensors.trout.so)Install system fs image: out/target/product/generic/system.imgroot@luke-virtual-machine:~/bin#
- 编译Android2.2源码(1)
- android2.2源码编译
- android2.2源码编译
- ubuntu 编译android2.2源码配置环境及jdk5(1)
- 编译Android2.2源码(2):运行模拟器
- ubuntu 11.10(32位)下android2.2 源码编译
- android2.2源码编译问题7-4
- ubuntu 10.04编译Android2.2源码
- ubuntu下源码编译android2.2
- android2.3源码编译问题
- Android2.3.6源码下载编译
- android2.3源码编译小结
- Android2.3.1系统源码编译
- 下载android2.2源码(froyo)(1)
- [整]基于ubuntu 10.04(32位机)的Android2.2 源码编译
- ubuntu 编译android2.2源码配置环境及jdk5(2)
- ubuntu 编译android2.2源码配置环境及jdk5(3)
- ubuntu 编译android2.2源码配置环境及jdk5(4)
- Android动画详解
- 单例模式-确保对象的唯一性
- JVM基础 之Java HotSpot虚拟机中的内存管理
- MahApps.Metro使用
- MYSQL添加新用户 MYSQL为用户创建数据库 MYSQL为新用户分配权限
- 编译Android2.2源码(1)
- 正则特殊字符
- 关于在eclipse开发web时鼠标移动到图片上显示文字问题
- DensityUtil
- js 原始类型 内置对象 protype instanceof construcor Object.prototype.toString.call()
- ucos 信号量的理解3
- 使用JSON和Jersey的Java RESTful Web服务
- PHP的发展历史
- C++字符分割