DownloadError: android.googlesource.com:

解决ubuntu10.10 32位机 android源码下载错误:(2012.7.1)

 sudo apt-get install build-essential  
    sudo apt-get install make  
    sudo apt-get install gcc 

 sudo apt-get install g++  

sudo apt-get install libc6-dev  

    sudo apt-get install patch  
    sudo apt-get install texinfo  
    sudo apt-get install libncurses-dev
    sudo apt-get install git-core gnupg 
    sudo apt-get install flex 
    sudo apt-get install bison 
    sudo apt-get install gperf 
    sudo apt-get install libsdl-dev 
    sudo apt-get install libesd0-dev 
    sudo apt-get install libwxgtk2.6-dev   
    sudo apt-get install build-essential 
    sudo apt-get install zip 
    sudo apt-get install curl  


    sudo apt-get install ncurses-dev  


    sudo apt-get install zlib1g-dev  


    sudo apt-get install valgrind  

    sudo apt-get install python2.5 

解决方法

1. 浏览器登录https://android.googlesource.com/new-password,并用gmail帐号登录;

2. 点击网页上的“允许访问”,得到类似

1 machine android.googlesource.com login git-<userName>.gmail.com password <password>  2 machine android-review.googlesource.com login git-<userName>.gmail.com password <password> 

3. 把上面那段信息追加到~/.netrc文件结尾(请检查当前用户的权限, 如果不存在此文件则自己新建一个);

4. 下载地址的URI更改为https://android.googlesource.com/a/platform/manifest(中间加上了“/a”)。

5. repo init -u https://android.googlesource.com/a/platform/manifest -b android-2.3.3_r1

6. repo sync

即可下载Android源码。

官方的说法是:因为访问基本是匿名的,为了防止连接过多(指内网/虚拟机),对同一IP地址的连接数做了一定的限制。看来是用gmail帐号进行认证。

这样的话,在公司网络内或者用虚拟机下载的话,会经常遇到这问题。

源码官网指导网址: http://source.android.com/source/downloading.html


你可能感兴趣的:(虚拟机,android,python,ubuntu,Gmail,login)