Android(安卓)编译命令及选项
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
更多相关文章
- Android(安卓)APP tcpdump抓包方法
- android 编译出来的执行文件 not executable: magic 7F45
- Error generating final archive: Debug certificate expired on
- Android(安卓)4.0 编译全程
- Android之解决java.lang.UnsatisfiedLinkError: dlopen failed:
- Android(安卓)串口通讯集成
- Android开机键失灵启动手机的解决办法
- 安卓模拟器Android(安卓)studio中VT-x is disabled in BIOS问题
- Android(安卓)Studio下Jni开发配置