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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章