现在的位置: 首页 > 综合 > 正文

Android 编译命令及选项

2012年11月13日 ⁄ 综合 ⁄ 共 779字 ⁄ 字号 评论关闭

 

Android

编译命令及选项

1

运行
build/envsetup.sh,

该文件提供
m,mm,mmm

等命令

#. ./build/envsetup.sh

注意
: . .

之间是空格

运行之后用
help

查看命令

#help

m

编译整个
android

工程

mm

编译当前目录下的模块

mmm path

编译指定目录下的模块

2

配置参数

#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/

目录下有产品
,

则会自动扫描进去
.

3

附加
:

如何在
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


 

抱歉!评论已关闭.