kongkong's Blog

No Silver Bullet --- Computer Language is just a tool.

Android sdk download and compiles

| Comments

参考官方http://source.android.com/source/downloading.html

To install 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

Download the Repo tool and ensure that it is executable:
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

Initializing a Repo client

After installing Repo, set up your client to access the Android source repository:

Create an empty directory to hold your working files. If you're using MacOS, this has to be on a case-sensitive filesystem. Give it any name you like:

$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY

Run repo init to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest, which specifies where the various repositories included in the Android source will be placed within your working directory.

$ repo init -u https://android.googlesource.com/platform/manifest

To check out a branch other than "master", specify it with -b:

$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
-u 指的是url -b指的是branch下载哪一个分支。

对于出现无法下载:

error: Failed connect to android.googlesource.com:443;Connection refused while
解决方法:
$ vim /etc/hosts

增加下面内容,保存(提前保存好):

74.125.31.82 www.googlesource.com

74.125.31.82 android.googlesource.com

203.208.46.172 cache.pack.google.com

59.24.3.173cache.pack.google.com

and start the development…

建立本地android mirror
http://www.360doc.com/content/11/0923/16/474846_150658565.shtml
git-daemon:
http://blog.csdn.net/leopard_ray/article/details/4306987

Comments

comments powered by Disqus