說明
為了查看android源碼,之前使用Source Insight查看源碼,然后發現使用android studio查看源碼也挺方便的。
使環境變量生效
進入android源碼目錄執行以下指令
source ./build/envsetup.sh
編譯完整個源碼后執行以下指令編譯idegen模
mmm development/tools/idegen/
提示以下信息則編譯成功
...... #### make completed successfully (7 seconds) ####
接着執行以下腳本
development/tools/idegen/idegen.sh
提示以下信息則編譯成功
Read excludes: 21ms Traversed tree: 194799ms
以上指令執行成功后會在源碼目錄下生成相應的工程文件android.ipr
,然后打開android studio打開工程,使用android.ipr
導入整個源碼。