git 获取android source
来源:互联网 发布:数学建模算法与程序 编辑:程序博客网 时间:2024/06/15 08:12
在做android开发的时,在遇到某一问题,想看android 源代码, 模仿高手的写法, 寻求点思路。 但是之前一直困于没有获取到source code, 因此一直没有机会, 今天花了几个小时的时间,学习 git , 怎么获取android源代码。
android source 托管在两个地方:
1. https://github.com/android/
2. https://android.googlesource.com/?format=HTML
首先要说的是,获取android source code的方法简单。
1. 安装git
软件安装包:
windows : http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.11-preview20120710.exe
or http://code.google.com/p/msysgit/
具体的安装这里不介绍了。 基本上是next 就可以。
2. 下载android 源代码
2.1 用git 下载 platform/manifest
<1> 首先在windows 开始菜单中打开 git Bash
<2> 创建存放目录
例如:存放到E/android_source中
cd /e/android_source中; 没有android_source目录, 首先创建目录。
<3> 进入目录后,输入
git clone http://android.googlesource.com/platform/manifest.git
结果:新增manifest文件。 里面有5个文件:
.git 目录;
base-for-3.0-gpl.xml;
base-for-3.1-gpl.xml;
base-for-3.2-gpl.xml;
default.xml;
2.2 下载一个应用source code 示例:
下载launcher2:
<1> 打开manifest/default.xml 文件
内容格式:<project path="packages/apps/Launcher2" name="platform/packages/apps/Launcher2" />
<2>在git bash中 进入目录:E/android_source 下 , 创建一个文件launcher2
<3> 进入launcher2 : cd launcher2
<4> 输入 git clone http://android.googlesource.com/platform/packages/apps/Launcher2
耐心等待, 下载完成后, 在launcher2中会有source code。
下载其他的同样的方式。
- git 获取android source
- Git on Android source
- Android 的source (需安装 git repo)
- git 获取android.jar
- 【Android-Source】Install Git and repo to get android source code
- Repo and Git, to get Android source code.
- 使用git工具下载android.jar Source Code
- git clone cm source & cm vs android version
- mac的android studio上使用git clone source repository
- source tree git 命令
- Android Source
- Android source
- Android source
- android source
- git获取Android源码,可以断点续传
- 使用Git和Repo获取Android源码
- windows通过git获取 android 源代码
- windows通过git获取 android 源代码
- 21-定义枚举的构造函数、方法和字段
- 关于 size_t , uintptr_t , intptr_t, int
- WebForm请求模型与MVC请求模型 图
- Linux从用户层到内核层系列 - GNU系列之你所不知道的printf
- idea 使用手册
- git 获取android source
- 表长(lua)
- 字符串逆序(lua实现)
- 职场晋升有玄机,老板红人最得意
- wash card(java 实现)
- vmware tools ,/mnt/hgfs 下没有共享
- lua取整
- vs查看宏展开
- wash card (lua实现)