Android自學筆記:Git下載原始碼

來源:互聯網
上載者:User

標籤:des   android   style   blog   http   color   io   os   ar   

Info:做J2ME幾年了,現在基本沒有公司用了,是時候向Android領域進軍了。

自學中,難免會有疏漏,有問題請及時提出,共同學習共同進步。

2014-10-13:初版

2014-10-14:添加 下載中斷後的處理方法,可惜網上寫的都沒辦法用,重新下載才行,誰有方法望告知。

--------------------------------------------

一、環境:

網址:https://android.googlesource.com/ (不能訪問請FQ)

工具:Git(預設安裝即可)

二、開始下載

a. 建立一個檔案夾(名字隨意)

 

b. 進入檔案夾,右鍵->選擇Git Bash Here

c. 開啟https://android.googlesource.com/(進不去的請FQ)

 

d. 在$後輸入 git clone https://android.googlesource.com/name

e. 比如我要下載frameworks/base下的檔案,只需輸入

git clone https://android.googlesource.com/platform/frameworks/base

接下來是漫長的等待,取決於自身網速~~

 下載完成後是這個樣子:

三、遇到的小問題:

如果不小心中斷了。。。。(我中斷了多次,網上試了各種方法無效,哭~)再次clone會報如下錯誤:

錯誤資訊:

fatal: destination path ‘.‘ already exists and is not an empty directory.

解決方案(其實就是刪除重新下載,如有其它方法望告知):

    ls -a      rm .git/ -rf  

如果出現permission denied,查看是否有其他程式佔用了.git檔案夾。


 

Android自學筆記:Git下載原始碼

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.