Android Studio匯入系統源碼及配置

來源:互聯網
上載者:User

標籤:

一、匯入源碼1、首先在根目錄執行 :source build/envsetup.sh2、然後執行:mmm development/tools/idegen/   //這行命令的意思是編譯idegen這個項目,產生idegen.jar檔案3、sh ./development/tools/idegen/idegen.sh //  這行命令的意思是產生對應的檔案:android.iws, android.ipr, android.iml 4、產生對應的檔案後,開啟Android Studio,選擇開啟一個現有的Android Studio項目,選擇Android源碼的根目錄,匯入即可(起作用的是android.irp檔案).在配置sdk版本之後就可以查看Android 源碼了 二、配置匯入檔案,去掉多餘檔案,加快匯入速度,在android.iml 檔案底部加入即可。       <excludeFolder url="file://$MODULE_DIR$/.repo" />      <excludeFolder url="file://$MODULE_DIR$/abi" />      <excludeFolder url="file://$MODULE_DIR$/art" />      <excludeFolder url="file://$MODULE_DIR$/bionic" />      <excludeFolder url="file://$MODULE_DIR$/bootable" />      <excludeFolder url="file://$MODULE_DIR$/build" />      <excludeFolder url="file://$MODULE_DIR$/cts" />      <excludeFolder url="file://$MODULE_DIR$/dalvik" />      <excludeFolder url="file://$MODULE_DIR$/developers" />      <excludeFolder url="file://$MODULE_DIR$/development" />      <excludeFolder url="file://$MODULE_DIR$/device" />      <excludeFolder url="file://$MODULE_DIR$/docs" />      <excludeFolder url="file://$MODULE_DIR$/external" />      <excludeFolder url="file://$MODULE_DIR$/external/bluetooth" />      <excludeFolder url="file://$MODULE_DIR$/external/chromium" />      <excludeFolder url="file://$MODULE_DIR$/external/emma" />      <excludeFolder url="file://$MODULE_DIR$/external/icu4c" />      <excludeFolder url="file://$MODULE_DIR$/external/jdiff" />      <excludeFolder url="file://$MODULE_DIR$/external/webkit" />      <excludeFolder url="file://$MODULE_DIR$/frameworks/base/docs" />      <excludeFolder url="file://$MODULE_DIR$/hardware" />      <excludeFolder url="file://$MODULE_DIR$/libcore" />      <excludeFolder url="file://$MODULE_DIR$/libnativehelper" />      <excludeFolder url="file://$MODULE_DIR$/ndk" />      <excludeFolder url="file://$MODULE_DIR$/out" />      <excludeFolder url="file://$MODULE_DIR$/out/eclipse" />      <excludeFolder url="file://$MODULE_DIR$/out/host" />      <excludeFolder url="file://$MODULE_DIR$/out/target/common/docs" />      <excludeFolder url="file://$MODULE_DIR$/out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates" />      <excludeFolder url="file://$MODULE_DIR$/out/target/product" />      <excludeFolder url="file://$MODULE_DIR$/packages" />      <excludeFolder url="file://$MODULE_DIR$/pdk" />      <excludeFolder url="file://$MODULE_DIR$/prebuilt" />      <excludeFolder url="file://$MODULE_DIR$/prebuilts" />      <excludeFolder url="file://$MODULE_DIR$/sdk" />      <excludeFolder url="file://$MODULE_DIR$/system" />      <excludeFolder url="file://$MODULE_DIR$/tools" />

 

Android Studio匯入系統源碼及配置

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.