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. Android传感器源码分析(AOSP)
  2. Android复制Assets目录下的文件到指定目录
  3. android 源码下载中遇到的问题 repo sync
  4. http://source.android.com/ android官网(下载源码及sdk)
  5. Android LayoutInflater 源码解析
  6. cordova生成android的app项目目录后运行cordova build android出
  7. android 9.0 获取U盘路径
  8. 一句话源码
  9. Android线程池(四)ThreadPoolExecutor类源码解析

随机推荐

  1. Android中的测试小demo
  2. 介绍几本初学Android资料和教材——选对
  3. android中下载文件到sdcard和进度条小结
  4. android之PhoneGap入门
  5. Android(安卓)4.0 Launcher2源码分析——
  6. android初学者的探索之路(Android音乐播放
  7. Android(安卓)体系结构
  8. unity调用MMBilling_2.4.2 Android(安卓)
  9. Android使用Application总结
  10. Android(安卓)开发人员必须掌握的 10 个