设为首页 加入收藏

TOP

Android源码编译make的错误处理
2014-11-24 13:19:06 来源: 作者: 【 】 浏览:0
Tags:Android 源码 编译 make 错误 处理

Android编译版本: PLATFORM_VERSION=4.0.1(最新Android 4.0.1)




首先,我们先安装一些常用的工具
curl:
sudo apt-get install curl


git: sudo apt-get install git


g++: sudo apt-get install g++




然后,遇到缺什么就安装什么




/usr/bin/ld: cannot find -lz


host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1
解决方法: sudo apt-get install zlib1g-dev sudo apt-get install lib64z1-dev


/bin/bash: bison: command not found


Yacc: aidl <= frameworks/base/tools/aidl/aidl_language_y.y
bison -d -o out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y
/bin/bash: bison: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Error 127
解决方法:sudo apt-get install bison




/bin/bash: flex: command not found


out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp: In function ‘int yyparse()’:
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp:1827: warning: deprecated conversion from string constant to ‘char*’
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp:1970: warning: deprecated conversion from string constant to ‘char*’
Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
/bin/bash: flex: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 127
解决方法: sudo apt-get install flex




/usr/bin/ld: cannot find -lncurses


host Executable: adb (out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1


解决方法:sudo apt-get install libncurses5-dev




fatal error: GL/glx.h: No such file or directory


development/tools/emulator/opengl/host/libs/Translator/GLcommon/GLDispatch.cpp:22: fatal error: GL/glx.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libGLcommon_intermediates/GLDispatch.o] Error 1


解决方法:sudo apt-get install libgl1-mesa-dev




sh: gperf: not found


target Generated: libwebcore <= external/webkit/Source/java scriptCore/create_regex_tables
Generating CSSPropertyNames.h <= CSSPropertyNames.in
sh: gperf: not found
calling gperf failed: 32512 at ./makeprop.pl line 140.
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/css/CSSPropertyNames.h] Error 25
make: *** Deleting file `out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/css/CSSPropertyNames.h'


解决方法:sudo apt-get install gperf


具体下载目录在 /pub/Android源码集锦/2011年/11月/Android源码编译make的错误处理/


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Android平台联网的时候遇到SSL证.. 下一篇为Android的界面设计增加跳跃效果

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: