#. ./build/envsetup.sh
注意 : . . 之间是空格
运行之后用 help 查看命令
#help
m 编译整个 android 工程
mm 编译当前目录下的模块
mmm path 编译指定目录下的模块
#tapas
运行该命令后会出现 :
Build for the simulator or the device?
1. Device
2. Simulator
Which would you like? [1]
Build type choices are:
1. release
2. debug
Which would you like? [1]
Product choices are:
1. emulator
2. generic
3. sim
You can also type the name of a product if you know it.
Which would you like? [generic]
以上产品选项是默认的 , 如果 vendor/ 目录下有产品 , 则会自动扫描进去 .
以 HTC 为例 :
vendor/htc/dream-open 在配置时会出现如下错误 :
build/core/product_config.mk:173: *** No matches for product "dream-open".
原因是 :
vendor/htc/dream-open/htm_dream.mk 里 PRODUCT_NAME := htc_dream , 所以 dream-open 要改为 htc_dream, 还有文件夹命名不能有 – ( 中间 ), 但可以有 _( 底下 )
dream-open -> htc_dream
PRODUCT_NAME := htc_dream
PRODUCT_DEVICE := htc_dream