android-source - 如何正确清理模块并在 AOSP 中重建它?
问题描述
AOSP 的顶层目录是~/WORKING_DIRECTORY。如果我跑
~/WORKING_DIRECTORY$ make
整个系统构建正确。
根据Building a specific 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
它仍然在构建,这意味着新文件根本没有被编译。请参阅屏幕截图。
重建模块的正确方法是什么?
解决方案
模块清洗:
cd $ANDROID_BUILD_TOP
make clean-module_name
艺术项目有多个目标模块。您应该为它们一一使用清洁。
推荐阅读
- javascript - 正则表达式匹配 Javascript 中的版本号
- python - 如何使用 Jinja2 单独访问字典列表中的每个字典?
- substrate - Parity Substrate - 区块尚未最终确定
- html - 是否可以使用 Bootstrap 4 将 div 折叠到左侧,而不是 div 折叠到顶部?(动画)
- vue.js - 未捕获的 ReferenceError:显示表格时未定义 Vue
- python - BeautifulSoup4 如何检查标签是否有特定的子标签
- java - 来自 Java 错误 NoHostAvailableException 的 Datastax Cassandra SSL 连接
- typescript - 如何让 TypeScript 对扩展从“节点模块”导入的类感到满意?
- javascript - 是否可以将 github 网页连接到 SQL 数据库?
- python - 数据集不适合 LSTM 训练的内存