Android源码4.4编译
2016-07-05 14:37
911 查看
Android源码4.4编译
在编译Android时遇到一些问题,及时记下,以防以后忘记:环境
Java环境-
JdK1.6
需要用到的命令
-
sudo apt-get install make flex gcc g++ libc6-dev patch texinfo zlib1g-dev valgrind
-
sudo apt-get install python2.7(或者更高版本)
编译
source build/envsetup.shlunch
make -j4
make systemimage 生成system.img
更多命令参照:http://gityuan.com/2016/03/19/android-build/
=================编译问题=============
问题1=============
File "scripts/make_css_value_keywords.py", line 177, in <module> File "scripts/make_css_property_names.py", line 238, in <module> in_generator.Maker(CSSValueKeywordsWriter).main(sys.argv) in_generator.Maker(CSSPropertiesWriter).main(sys.argv) File "/opt/cBPM-android/android4.4_source_code/external/chromium_org/third_party/WebKit/Source/core/scripts/in_generator.py", line 119, in main File "/opt/cBPM-android/android4.4_source_code/external/chromium_org/third_party/WebKit/Source/core/scripts/in_generator.py", line 119, in main writer.write_files(options.output_dir) writer.write_files(options.output_dir) File "/opt/cBPM-android/android4.4_source_code/external/chromium_org/third_party/WebKit/Source/core/scripts/in_generator.py", line 77, in write_files File "/opt/cBPM-android/android4.4_source_code/external/chromium_org/third_party/WebKit/Source/core/scripts/in_generator.py", line 77, in write_files self._write_file(output_dir, generator(), file_name) self._write_file(output_dir, generator(), file_name) File "scripts/make_css_property_names.py", line 233, in generate_implementation File "scripts/make_css_value_keywords.py", line 172, in generate_implementation gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE) gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE) File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__ File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory raise child_exception OSError: [Errno 2] No such file or directory make: *** [out/target/product/generic/obj/GYP/shared_intermediates/blink
解决方法
sudo apt-get install gperf
问题2=============
Traceback (most recent call last): File "scripts/rule_bison.py", line 75, in <module> returnCode = subprocess.call([bisonExe, '-d', '-p', prefix, inputFile, '-o', outputCpp]) File "/usr/lib/python2.7/subprocess.py", line 522, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib/python2.7/subprocess.py", line 710, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory
解决方法
sudo apt-get install bison
问题3=============
/bin/bash: xmllint: command not found make: *** [out/target/product/generic/system/etc/apns-conf.xml] Error 127 make: *** Waiting for unfinished jobs....
解决方法
sudo apt-get install libxml2-utils
相关文章推荐
- 使用C++实现JNI接口需要注意的事项
- Android IPC进程间通讯机制
- Android Manifest 用法
- [转载]Activity中ConfigChanges属性的用法
- Android之获取手机上的图片和视频缩略图thumbnails
- Android之使用Http协议实现文件上传功能
- Android学习笔记(二九):嵌入浏览器
- android string.xml文件中的整型和string型代替
- i-jetty环境搭配与编译
- android之定时器AlarmManager
- android wifi 无线调试
- Android Native 绘图方法
- Android java 与 javascript互访(相互调用)的方法例子
- android 代码实现控件之间的间距
- android FragmentPagerAdapter的“标准”配置
- Android"解决"onTouch和onClick的冲突问题
- android:installLocation简析
- android searchView的关闭事件
- SourceProvider.getJniDirectories