下载android的源码

安装环境是linux平台

1’ http://source.android.com学习一下

1,安装git,(1.7)

2,安装python(2.7),python3不行。

3,获取android的repo脚本(需要安装curl)

......

以下为正文

[@more@]安装环境是linux平台

1’ http://source.android.com学习一下

1,安装git,(1.7)

2,安装python(2.7),python3不行。

3,获取android的repo脚本(需要安装curl)

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
4,将repo加上可执行权限。将repo放到path环境变量中。

5,测试一下repo是否可以执行

正常应该出现:

repo
error: repo is not installed. Use "repo init" to install it here.

或者:

usage: repo COMMAND [ARGS]

The most commonly used repo commands are:

abandon Permanently abandon a development branch
branch View current topic branches
branches View current topic branches
checkout Checkout a branch for development
cherry-pick Cherry-pick a change.
diff Show changes between commit and working tree
download Download and checkout a change
grep Print lines matching a pattern
init Initialize repo in the current directory
list List projects and their associated directories
prune Prune (delete) already merged topics
rebase Rebase local branches on upstream branch
smartsync Update working tree to the latest known good revision
stage Stage file(s) for commit
start Start a new branch for development
status Show the working tree status
sync Update working tree to the latest revision
upload Upload changes for code review

See 'repo help ' for more information on a specific command.

可能出现的情况是:

a:

See File "./repo", line 180
except OSError, e:
^
SyntaxError: invalid syntax
'repo help --all' for a complete list of recognized commands.

这是因为你安装的python是2.5以下,或者2.7以上,你换成python2.7

b:

Traceback (most recent call last):
File "./repo", line 91, in
import readline
ImportError: No module named readline

这是因为你安装的python没有readline模块,需安装一下。

1):需要下载readline-6.2.1.tar.gz

2):安装readline-6.2.1时,需要执行python setup.py build

python setup.py install

3:)这时可能需要你安装setuptools

下载 setuptools-0.6c9-py2.7.egg,执行

sh setuptools-0.6c9-py2.7.egg

如果提示你/usr/bin/ld: cannot find -lxxxx,你去查询一下系统是否安装了xxxx ,包括 xxxx-dev

4:)安装完readline,repo应改能正常使用了。

python的资源,可能因为GFW的原因,不能正常访问。通过翻墙获取。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8557/viewspace-1056991/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/8557/viewspace-1056991/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值