Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> Android L下載

Android L下載

編輯:關於Android編程

Android L千呼萬喚終於出來了,那麼我們先下載下來一睹為快,那麼怎麼去拿到最新的L的分支
那按照傻瓜步驟總結下(Linux Ubuntu)
1.獲取repo文件
(1).curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
(2).chmod a+x ~/bin/repo
(3).export PATH=~/bin:$PATH


curl 是linux下面用命令發起網絡請求的工具,拿到repo文件找到位置直接加入到系統PATH中


2.利用repo獲取獲取源代碼
(1).mkdir src && cd src
(2).repo init -u https://android.googlesource.com/platform/manifest
(3).repo sync
上面代碼獲取的是master代碼


如果想單獨獲取某個分支的代碼
(1).mkdir src && cd src
(2).repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r2
(3).repo sync


如果已經有android倉庫但是還不是最新的,想切換到AndroidL分支分支
(1).cd .repo/manfiests && git branch -a | cut -d / -f 3
android-4.4.4_r2.0.1
android-4.4_r1
android-4.4_r1.0.1
android-4.4_r1.1
android-4.4_r1.1.0.1
android-4.4_r1.2
android-4.4_r1.2.0.1
android-4.4w_r1
android-5.0.0_r1
android-5.0.0_r2
(2).根據上面列表的選取android-5.0.0_r2
repo init -b android-5.0.0_r2
(3). repo sync
(4).全部切換到android-5.0.0_r2分支
repo start android-5.0.0_r2 --all
(5). repo branches
* android-5.0.0_r2 | in all projects
(6).cd external/jsmn && git branch
* android-5.0.0_r2


3.如何搭建本地倉庫方便周圍的人一塊使用
在從服務器獲取代碼創建本地倉庫
(1).mkdir -p ~/aosp/mirror
(2).cd ~/aosp/mirror
(3).repo init -u https://android.googlesource.com/mirror/manifest --mirror
(4).repo sync


從本地mirror獲取代碼
(1). mkdir -p ~/aosp/master
(2). cd ~/aosp/master
(3). repo init -u /home/username/aosp/mirror/platform/manifest.git
(4). repo sync


同步本地mirror以及本地代碼倉庫
(1).cd ~/aosp/mirror
(2).repo sync
(3).cd ~/aosp/master
(4).repo sync



聯系方式:
[email protected]
QQ:390012381
轉載請注明出處:http://blog.csdn.net/lihui130135
  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved