android5.0.0_r2 代码下载

  根据android.source.com给出的同步代码的方法
  repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r2
  repo sync
  这种方法经过我的测试是成功的,有可能提示 找不到 android-5.0.0_r2,多重复几次 应该可以成功,因为在 https://android.googlesource.com/platform/manifest/+refs
中可以找到branch: android-5.0.0_r2

同步代码中有可能出现的问题
1.branch没有找到
可以先到 https://android.googlesource.com/platform/manifest/+refs中查看 你所同步的branch 是否存在,这个里面的内容是变化的,google有可能会添加/删除branch,比如 之前存在的branch:lollipop-release,已经不存在了。
2.无法访问gerrit.googlesource.com
  user:~/work/android-5.0$ repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r2
  fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 101] Network is unreachable
  解决方案: 由于大家都知道的原因,我们经常无法访问google站点,与我们init 代码相关的站点有两个 android.googlesource.com  和 gerrit.googlesource.com,在/etc/hosts 中添加如下两行
   74.125.21.98     android.googlesource.com
   74.125.21.98     gerrit.googlesource.com
  如果上面的ip地址不起作用(将ip地址输入到浏览器地址栏),那么就去网上查找google网站最新的hosts
  经过我的测试 添加 这两行后 repo init 成功,让后通过 repo sync 同步代码
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值