AOSP的顶级目录为〜/ WORKING_DIRECTORY。如果我运行
~/WORKING_DIRECTORY$ make
整个系统正确构建。
根据Building a particular module in the android source code,https://stackoverflow.com/a/30671099/746461,如果我需要重建艺术品,我会
cd art
mm
但是它会引发错误:
FAILED: out/target/common/cpplint/art__compiler__optimizing__nodes.h
/bin/bash -c "(art/tools/cpplint.py --quiet --root=. --filter=-whitespace/line_length,-build/include,-readability/function,-readability/streams,-readability/todo,-runtime/references,-runtime/sizeof,-runtime/threadsafe_fn,-runtime/printf art/compiler/optimizing/nodes.h ) && (mkdir -p out/target/common/cpplint/ ) && (touch out/target/common/cpplint/art__compiler__optimizing__nodes.h )"
art/compiler/optimizing/nodes.h:3974: Labels should always be indented at least one space. If this is a member-initializer list in a constructor or the base class list in a class definition, the colon should be on the following line. [whitespace/labels] [4]
art/compiler/optimizing/nodes.h:3978: Labels should always be indented at least one space. If this is a member-initializer list in a constructor or the base class list in a class definition, the colon should be on the following line. [whitespace/labels] [4]
art/compiler/optimizing/nodes.h:3983: Labels should always be indented at least one space. If this is a member-initializer list in a constructor or the base class list in a class definition, the colon should be on the following line. [whitespace/labels] [4]
art/compiler/optimizing/nodes.h:3987: Labels should always be indented at least one space. If this is a member-initializer list in a constructor or the base class list in a class definition, the colon should be on the following line. [whitespace/labels] [4]
art/compiler/optimizing/nodes.h:3992: Labels should always be indented at least one space. If this is a member-initializer list in a constructor or the base class list in a class definition, the colon should be on the following line. [whitespace/labels] [4]
art/compiler/optimizing/nodes.h:3996: Labels should always be indented at least one space. If this is a member-initializer list in a constructor or the base class list in a class definition, the colon should be on the following line. [whitespace/labels] [4]
Done processing art/compiler/optimizing/nodes.h
Total errors found: 6
[ 1% 108/10017] Building with Jack: out/ho...S/core-oj-hostdex_intermediates/classes.dex
ninja: build stopped: subcommand failed.
17:27:03 ninja failed with: exit status 1
#### failed to build some targets (13 seconds) ####
如果我呆在〜/ WORKING_DIRECTORY中并给mm art打电话,它似乎可以正确构建。
但是,如果我故意在源代码中犯了一个错误,请运行
~/WORKING_DIRECTORY$ mm art
它仍在生成,这意味着新文件完全没有编译。查看屏幕截图。
重建模块的正确方法是什么?
答案 0 :(得分:0)
模块的清洁:
cd $ANDROID_BUILD_TOP
make clean-module_name
艺术项目有多个目标模块。您应该一一使用干净。