android源碼下載遇到的問題


問題描述:參照google文檔說明:http://source.android.com/source/downloading.html  一步一步設置,

 

$ mkdir ~/bin $ PATH=~/bin:$PATH 

$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo $ chmod a+x ~/bin/repo 

$ mkdir WORKING_DIRECTORY $ cd WORKING_DIRECTORY 

$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1 

$ repo sync 

 

一切很順利,只是每次下到5G左右后就結束了:

log大致如下: 

Unpacking objects: 100% (23/23), done.
From http://android.googlesource.com/platform/prebuilt
 * [new branch]      ics-plus-aosp -> aosp/ics-plus-aosp
   f37f794..f6e5b79  jb-dev     -> aosp/jb-dev
 * [new branch]      jb-mr0-release -> aosp/jb-mr0-release
   f787b1d..1e1589a  jb-release -> aosp/jb-release
 * [new tag]         android-4.1.1_r1 -> android-4.1.1_r1
 * [new tag]         android-4.1.1_r1.1 -> android-4.1.1_r1.1
 * [new tag]         android-4.1.1_r2 -> android-4.1.1_r2
 * [new tag]         android-4.1.1_r3 -> android-4.1.1_r3
 * [new tag]         android-4.1.1_r4 -> android-4.1.1_r4
 * [new tag]         android-4.1.1_r5 -> android-4.1.1_r5
 * [new tag]         android-4.1.1_r6 -> android-4.1.1_r6
 * [new tag]         android-4.1.1_r6.1 -> android-4.1.1_r6.1
 * [new tag]         android-4.1.2_r1 -> android-4.1.2_r1
 * [new tag]         android-cts-4.1_r1 -> android-cts-4.1_r1
Fetching projects: 100% (165/165), done.  

然后界面就一直停在這,第一次下android源碼,也不知道怎么才算成功,看這提示貌似成功了,到源碼目錄ls一下,傻眼了 啥也沒有,空空如也,再ll,有一個.repo文件夾,這個文件夾的文件大小大約就5G,也就是說我下了半天就只下了個.repo文件夾。

找log,沒有發現任何異常,google一遍,基本上大家都是按google官方文檔步驟就下載成功了,遇到的一些問題跟我的情況也都不一致,

抑郁了,反復看http://source.android.com/source/downloading.html 里的描述,也沒發現什么,無奈之下,查了一遍軟件版本:

 repo --version


... A  new repo command ( 1.18) is available.
... You should upgrade soon:

    cp /home/xxxx/bin/.repo/repo/repo /home/xxxx/bin/repo

repo version v1.11.1
       (from https: // gerrit.googlesource.com/git-repo)
repo launcher version 1.17
       (from /home/xxxx/bin/repo)
git version 1.7.5.4
Python 2.7.2+ ( default, Jul 20 2012, 22:15:08) 
[GCC 4.6.1]

gnu make 版本:

make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source  for copying conditions.
There is NO warranty; not even  for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu 

我的jdk版本是1.6 看這版本也符合,google文檔要求的版本為:

 Detailed instructions for Ubuntu and MacOS follow. In general you will need:


Python 2.5 -- 2.7, which you can download from python.org.

GNU Make 3.81 -- 3.82, which you can download from gnu.org,

JDK 6  if you wish to build Gingerbread or newer; JDK 5  for Froyo or older. You can download both from java.sun.com.

Git 1.7 or newer. You can find it at git-scm.com.

 這一切都符合,只有結果不符合。

看看真個過程,似乎都很完美,只是有一個提示:

... A  new repo command ( 1.18) is available.

... You should upgrade soon: 

 

google文檔里沒有說要求repo的版本,我的repo版本是1.17 

看到有這么個提示,想想把repo升級了看看吧。

於是使用如下命令:

repo init --repo-url https://android.googlesource.com/tools/repo -u http://android.googlesource.com/platform/manifest -b android-2.3.3_r1

 

這個命令比google文檔里的多了一個參數: 

 --repo-url https://android.googlesource.com/tools/repo

它強制升級repo版本,

重新下載一遍,我成功的看到以下日志:

From http: // android.googlesource.com/platform/prebuilt
 * [ new branch]      ics-plus-aosp -> aosp/ics-plus-aosp
   f37f794..f6e5b79  jb-dev     -> aosp/jb-dev
 * [ new branch]      jb-mr0-release -> aosp/jb-mr0-release
   f787b1d..1e1589a  jb-release -> aosp/jb-release
 * [ new tag]         android-4.1.1_r1 -> android-4.1.1_r1
 * [ new tag]         android-4.1.1_r1.1 -> android-4.1.1_r1.1
 * [ new tag]         android-4.1.1_r2 -> android-4.1.1_r2
 * [ new tag]         android-4.1.1_r3 -> android-4.1.1_r3
 * [ new tag]         android-4.1.1_r4 -> android-4.1.1_r4
 * [ new tag]         android-4.1.1_r5 -> android-4.1.1_r5
 * [ new tag]         android-4.1.1_r6 -> android-4.1.1_r6
 * [ new tag]         android-4.1.1_r6.1 -> android-4.1.1_r6.1
 * [ new tag]         android-4.1.2_r1 -> android-4.1.2_r1
 * [ new tag]         android-cts-4.1_r1 -> android-cts-4.1_r1
Fetching projects: 100% (165/165), done.  
Checking out files: 100% (4679/4679), done.out files:  45% (2126/4679)   
Checking out files: 100% (4573/4573), done.out files:  15% (696/4573)   
Checking out files: 100% (10008/10008), done.t files:   2% (287/10008)   
Checking out files: 100% (11980/11980), done.t files:   0% (6/11980)   
Checking out files: 100% (5169/5169), done. out files:  49% (2544/5169)   
Checking out files: 100% (985/985), done.ng out files:  10% (105/985)   
Checking out files: 100% (297/297), done.ng out files:   2% (8/297)   
Checking out files: 100% (684/684), done.ng out files:  41% (283/684)   
Checking out files: 100% (9601/9601), done. out files:   1% (172/9601)   
Checking out files: 100% (1328/1328), done.
Syncing work tree: 100% (165/165), done. 

 

查看源碼目錄,多了幾個工程:

 ls

bionic  bootable  build  cts  dalvik  development  device  external  frameworks  hardware  libcore  Makefile  ndk  packages  prebuilt  sdk  system 


免責聲明!

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



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