linux環境下編譯Android apk


Android源碼目錄下的build/envsetup.sh文件,描述編譯的命令

- m:       Makes from the top of the tree. 
- mm:      Builds all of the modules in the current directory. 
- mmm:     Builds all of the modules in the supplied directories.

要想使用這些命令,首先需要在android源碼根目錄執行. build/envsetup.sh 腳本設置環境

m:編譯所有的模塊 
mm:編譯當前目錄下的模塊,當前目錄下要有Android.mk文件 
mmm:編譯指定路徑下的模塊,指定路徑下要有Android.mk文件

下面舉個例子說明,假設我要編譯android下的\hardware\libhardware_legacy\power模塊,當前目錄為源碼根目錄,方法如下:

1、. build/envsetup.sh 
2、mmm hardware/libhardware_legacy/power/

或者 :

1、. build/envsetup.sh 
2、cd hardware/libhardware_legacy/power/

3、mm


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM