`
wjjxf
  • 浏览: 237542 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Android源码下载出现的问题

阅读更多

      在下载Android源码的时候,参照Android官方的文档,我的是mac的虚拟机,按照该页面的步骤http://source.android.com/source/initializing.html。Setting up a Mac OS X build environment。

先创建一个40g的硬盘,大小写敏感的,日志的。不用写命令,在mac有ui工具可完成,很方便。

 

然后

export PATH=/opt/local/bin:$PATH


$ POSIXLY_CORRECT=1 sudo port install gmake libsdl git-core gnupg

  • Edit /opt/local/etc/macports/sources.conf and add a line that says

    file:///Users/Shared/dports
    
    

    above the rsync line. Then create this directory:

    $ mkdir /Users/Shared/dports
    
    
  • In the new dports directory, run

    $ svn co --revision 50980 http://svn.macports.org/repository/macports/trunk/dports/devel/gmake/ devel/gmake/
    
    
  • Create a port index for your new local repository:

    $ portindex /Users/Shared/dports
    
    
  • Finally, install the old version of gmake with

    $ sudo port install gmake @3.81
    

    To increase the cap, add the following lines to your ~/.bash_profile :

      ulimit -S -n 1024 



这一切都很顺利,然后下载代码:

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

$ curl https://android.git.kernel.org/repo > ~/bin/repo

这一步,出错了,下载的repo是个not found的文件,直接打开https://android.git.kernel.org/repo,发现确实是not found啊,郁闷,没有repo后面的步骤都无法进行了,再在google搜索类似问题,得到正解,被屏蔽了,不过有个镜像站点,可以用。https://www.codeaurora.org/gitweb/quic/la/

里面可以找到repo,既然android.git.kernel.org被屏蔽,后面使用该地址的都会出错,于是把Repo的REPO_URL改为git://codeaurora.org/tools/repo.git,如下:

#REPO_URL='git://android.git.kernel.org/tools/repo.git'
REPO_URL='git://codeaurora.org/tools/repo.git'

附件是我改好的Repo,可以直接下载使用

现在开始把

$ repo init -u git://android.git.kernel.org/platform/manifest.git

改为

$ repo init -u git://
codeaurora.org/platform/manifest.git

即可。

然后

$ repo sync

 

就行了!

分享到:
评论
1 楼 DeepThought 2012-11-09  
必须赞一个 用了各种方法 最终还是改了repo才能下载! Thanks!

相关推荐

Global site tag (gtag.js) - Google Analytics