`

unbutu下安装repo并下载源码

 
阅读更多

1.安装git

sudo apt-get install git-core

2.安装curl

sudo apt-get install git-core curl

3.安装repo, 通过curl下载repo

 

  • Make sure you have a bin/ directory in your home directory, and that it is included in your path:

    $ mkdir ~/bin
    $ PATH=~/bin:$PATH
  • 注意下面的路径,以前老是用旧的,http://android.git.kernel.org/repo ,生成的repo文件不对。

    $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
    
  •  

    4.修改执行权限

    chmod a+x ~/bin/repo

     

    5新建一个目录,然后进入该目录。

  • $ mkdir WORKING_DIRECTORY
    $ cd WORKING_DIRECTORY//存放项目的源码
    
  • 6执行repo init 

    注意:如果报找不到repo错误时,可以把repo整个路径都列出来。如~/bin/repo init.....

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

    7执行repo sync

$ repo sync//从服务器上下载源码

引用路径:http://source.android.com/source/downloading.html 感谢开源啊,解决大问题了。嘿嘿

分享到:
评论
1 楼 xiaofeishouxiao 2012-12-18  
     

相关推荐

Global site tag (gtag.js) - Google Analytics