如何下载Android的谷歌源代码

如您所知,https://android.googlesource.com/中有几百个项目的列表.我想在Windows机器上全部下载它们.根据谷歌的文件,
To install,initialize,and configure Repo:

$curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$chmod a+x ~/bin/repo


To clone the entire platform,install repo,and run:

mkdir mydroid
cd mydroid
repo init -u https://android.googlesource.com/platform/manifest
repo sync

但是,在我的机器中,我无法在Git Bash中“repo init”,因为它说它没有python.我安装了python,但git bash无法识别它.请注意,我也将python目录设置为系统路径.如果有人能给出小费,我将不胜感激.谢谢

更新:我认为新版本的Git Bash for Windows存在问题.系统路径根本不适用于Git Bash – 我可以轻松测试系统路径是否与命令提示符一起使用.无论如何,我尝试了这个,当然它实际上运行错误.

/c/python27/python.exe  ../bin/repo init -u https://android.googlesource.com/platform/manifest

错误消息是

$/c/python27/python.exe ../bin/repo init -u https://android.googlesource.com/platform/manifest
 Traceback (most recent call last):
   File "../bin/repo",line 91,in <module>
    import readline
 ImportError: No module named readline

好.我通过在Windows中安装pyreadline来传递此错误:

easy_install pyreadline

如果出现错误,则必须安装setuptools

http://pypi.python.org/pypi/setuptools#files

最后再次运行命令得到这个:

$repo init -u https://android.googlesource.com/platform/manifest
fatal: unable to start d:myworkdevGoogleAndroidworking_dir.reporepo/main.py
fatal: [Errno 8] Exec format error

解决方法

只需单击一下,从此处下载最新代码为.tar.gz文件
https://android.googlesource.com/platform/frameworks/base/+archive/master.tar.gz,android可以在core文件夹下找到

编辑
替代方案:
http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android/

只需选择版本,然后选择其中的下载选项.

以上是来客网为你收集整理的如何下载Android的谷歌源代码全部内容,希望文章能够帮你解决如何下载Android的谷歌源代码所遇到的程序开发问题。

如果觉得来客网网站内容还不错,欢迎将来客网网站推荐给程序员好友。