赞
踩
进行Android开发的第一步,就是在本地建立一个Android源码库,以便项目人员协同开发。
下面描述Android代码库本地镜像的建立过程::
1、准备服务器:准备一台本地镜像服务器,通常是安装了Git工具的Linux服务器,并保证服务器的网络畅通;
2、同步Android源码:命令如下
$ mkdir android-mirror-dir
$ cd android-mirror-dir
$ repo init --mirror -u git://android.git.kernel.org/platform/manifest.git
解释:repo是批量操作Git库的脚本,android镜像由160个左右的Git库组成,Git库信息在manifest.git库中;
$ repo sync
备注:
1、请参考《Git权威指南》4.6.6章节;
2、--mirror参数:同步Android源码“镜像”到本地服务器,包括本地分支、远程分支、Tag等。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。