Windows环境下Android(安卓)Sdk源码下载
- 安裝Cygwin 要安裝的packages如下:
Net -> curl
Devel -> git* (git, git-completion, git-gui, gitk)
Libs -> libreadline6, libiconv2
Editors -> vim
Python -> python
- 下载整个源码
(启动Cygwin之后,开始Repo)
$ cd ~
$ mkdir bin
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo> ~/bin/repo
$ chmod a+x ~/bin/repo
$ cd ~
$ mkdir mydroid
$ cd mydroid
$ ~/bin/repo init -u https://android.googlesource.com/platform/manifest
(需要输入一个已申請Google account的email)
如果cygwin出错:Resource temporarily unavailable。
退出cygwin,找到cygwin目录下的ash.exe,双击运行。执行shell命令
/bin/rebaseall
执行完毕,重新进入cygwin,重新repo init,应该能正常执行了。
$ ~/bin/repo sync
-
下载单个项目的源码
$ cd ~
$mkdir android/android-source –p$cd android
$git clone https://android.googlesource.com/platform/frameworks/base.git android-sdk-source
-
获取各个版本SDK源码
$cd ~
$mkdir android/android-sdk-source –p
$cd android/android-sdk-source//显示所有的分支,包括远程和本地分支,我们没有建立分支,所有没有本地分支
$git branch –a
//显示所有标签$git tag
//检出源码
$git checkout (branch)/(tag)
其中core/java下即为sdk源码
-
Platform
Codename
API Level
Android 1.5
Cupcake
3
Android 1.6
Donut
4
Android 2.1
Eclair
7
Android 2.2
Froyo
8
Android 2.3 -
Android 2.3.2Gingerbread
9
Android 2.3.3 -
Android 2.3.710
Android 3.0
Honeycomb
11
Android 3.1
12
Android 3.2
13
Android 4.0 -
Android 4.0.2Ice Cream Sandwich
14
Android 4.0.3
15
更多相关文章
- 分支和循环(二)(零基础学习C语言)
- 【安卓笔记】Volley全方位解析,带你从源码的角度彻底理解
- Android(安卓)Instrumentation源码分析(附Activity启动流程)
- Android(安卓)JiaoZiVideoPlayer源码分析
- vlc-android 移植live555到android
- android--startActivity(intent)分析源码
- Android(安卓)SQLiteOpenHelper使用和源码详解
- 编译Android版本的libmad
- Android之grafika源码阅读