免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1977 | 回复: 1
打印 上一主题 下一主题

android source [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-09 16:48 |只看该作者 |倒序浏览
android source









我的操作系统: ubuntu10.10
首先,我们先安装一些常用的工具
curl: sudo  apt-get  install  curl
git: sudo  apt-get  install  git
g++: sudo  apt-get  install  g++
android 源码的下载:
     1. mkdir bin 建立bin目录
     2. curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo  导入repo执行脚本
     3. chmod a+x ~/bin/repo 增加repo的执行权限
     4. mkdir workspace 建立自己要存放源码的目录
     5. repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1 初始化项目列表
     6. repo sync 下载项目
android 源码的编译和系统建立
  1.     1. cd workspace
  2.      2. source build/envsetup.sh
  3.      3. lunch full-eng
  4.      4. make -j4
复制代码
android make 时可能遇到的问题
  1. /usr/bin/ld: cannot find -lz
  2. host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
  3. /usr/bin/ld: cannot find -lz
  4. collect2: ld returned 1 exit status
  5. make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1
复制代码
解决方法: sudo apt-get install zlib1g-dev    sudo apt-get install lib64z1-dev
  1. /bin/bash: bison: command not found
  2. Yacc: aidl <= frameworks/base/tools/aidl/aidl_language_y.y
  3. bison -d  -o out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y
  4. /bin/bash: bison: command not found
  5. make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Error 127
复制代码
解决方法:sudo apt-get install bison
  1. /bin/bash: flex: command not found
  2. out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp: In function ‘int yyparse()’:
  3. out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp:1827: warning: deprecated conversion from string constant to ‘char*’
  4. out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp:1970: warning: deprecated conversion from string constant to ‘char*’
  5. Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
  6. /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
  1. /usr/bin/ld: cannot find -lncurses
  2. host Executable: adb (out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)
  3. /usr/bin/ld: cannot find -lncurses
  4. collect2: ld returned 1 exit status
  5. make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
复制代码
解决方法:sudo apt-get install libncurses5-dev
  1. fatal error: GL/glx.h: No such file or directory
  2. development/tools/emulator/opengl/host/libs/Translator/GLcommon/GLDispatch.cpp:22: fatal error: GL/glx.h: No such file or directory
  3. compilation terminated.
  4. make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libGLcommon_intermediates/GLDispatch.o] Error 1
复制代码
解决方法:sudo apt-get install libgl1-mesa-dev
  1. sh: gperf: not found
  2. target Generated: libwebcore <= external/webkit/Source/JavaScriptCore/create_regex_tables
  3. Generating CSSPropertyNames.h <= CSSPropertyNames.in
  4. sh: gperf: not found
  5. calling gperf failed: 32512 at ./makeprop.pl line 140.
  6. make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/css/CSSPropertyNames.h] Error 25
  7. make: *** Deleting file `out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/css/CSSPropertyNames.h'
  8. 解决方法:sudo apt-get install gperf
复制代码

论坛徽章:
0
2 [报告]
发表于 2011-12-23 22:26 |只看该作者
谢谢分享  希望于楼主多多交流
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP