Android源码下载:官方下载或参考android源码下载方式

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

OS 操作系统平台:Linux yanggang 2.6.35-30-generic #61-Ubuntu SMP Tue Oct 11 15:29:15 UTC 2011 i686 GNU/Linux(Ubuntu10.10 32bit)


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

git: sudo apt-get install git

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


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


/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/JavaScriptCore/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



更多参考下载







更多相关文章

  1. Android系列之Android(安卓)命令行手动编译打包详解
  2. 关于RelativeLayout的一点经验
  3. 解决Could not find method android() for arguments问题
  4. android 4.0 sdk直接下载地址
  5. [Android] Android的音频采集
  6. android中shape
  7. Android(安卓)自动编译、打包生成apk文件 4 - 多渠道批量打包
  8. 基于 Android(安卓)NDK 的学习之旅-----环境搭建
  9. Android(安卓)SDK 2.1 下载与安装教程

随机推荐

  1. [缃《] Android瀛︿範闅忔兂
  2. Android小项目之五 splash动画效果
  3. Android异步3:AsyncTask更新UI
  4. Android(安卓)Studio 使用Lint检查并去除
  5. Android解决方案之:Android(安卓)Studio中
  6. Android学习之自定义控件之图片带文字的V
  7. Android 6.0 (API 23, M)以上对permissio
  8. android安全问题(七) 抢先接收广播 - 内因
  9. Android对话框的高级设置《一》设置对话
  10. Android(安卓)WebView 上传文件支持全解