利用mm命令编译Android模块

      在Android开发过程中,当我们只需要编译某个修改过的模块时,使用mm命令可以使你不用编译整个Android项目,而只需单独编译该模块即可,这样速度是不是很快呢? 具体的步骤如下:

1. 在Android源代码目录下:

[c-sharp] view plain copy
  1. cd mydroid  
  2. source build/envsetup.sh  

也可以将source ~/mydroid/build/envsetup.sh放到~/.bashrc中,这样每次打开shell时就会自动运行该脚本。

2. 在shell中使用help命令查看可以运行的命令

[c-sharp] view plain copy
  1. # help  
  2. Invoke ". build/envsetup.sh" from your shell to add the following functions to your environment:  
  3. - croot:   Changes directory to the top of the tree.  
  4. - m:       Makes from the top of the tree.  
  5. - mm:      Builds all of the modules in the current directory.  
  6. - mmm:     Builds all of the modules in the supplied directories.  
  7. - cgrep:   Greps on all local C/C++ files.  
  8. - jgrep:   Greps on all local Java files.  
  9. - resgrep: Greps on all local res/*.xml files.  
  10. - godir:   Go to the directory containing a file.  
  11.   
  12. Look at the source to view more functions. The complete list is:  
  13. add_lunch_combo cgrep check_product check_variant choosecombo chooseproduct choosetype choosevariant cproj croot findmakefile gdbclient get_abs_build_var getbugreports get_build_var getprebuilt gettop godir help isviewserverstarted jgrep lunch m mm mmm pid printconfig print_lunch_menu resgrep runhat runtest set_java_home setpaths set_sequence_number set_stuff_for_environment settitle smoketest startviewserver stopviewserver systemstack tapas tracedmdump  

可以看到mm命令,意思是编译当前文件夹下的所有模块。

3. 接下来的事情将变得很简单,只需来到需要编译的模块文件夹下,运行mm命令即可,当然我们也可以用mmm命令,如mmm external/jpeg/,和在external/jpeg/目录下运行mm命令具有同样的效果。


原文地址:http://blog.csdn.net/kellycan/article/details/6457030

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值