Android源码4.4编译

Android源码4.4编译

在编译Android时遇到一些问题,及时记下,以防以后忘记:


环境

Java环境
- JdK1.6

需要用到的命令
- sudo apt-get install make flex gcc g++ libc6-dev patch texinfo zlib1g-dev valgrind libc6:i386 ia32-libs
- sudo apt-get install python2.7(或者更高版本)

编译

source build/envsetup.sh
lunch
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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值