完美的失败方案让 repo init 安卓源码仓库恢复到最初状态

本文记录了在初始化Android源码仓库时遇到的问题及解决过程。从`repo sync -d`报错开始,尝试安装repo、使用清华源和USTC镜像,到最后通过设置代理解决连接失败的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

repo sync -d

报错

The program 'repo' can be found in the following packages:
 * phablet-tools
 * repo
Try: sudo apt install <selected package>

安装repo

sudo apt install repo

没有repo init

error: command 'sync' requires repo to be installed first.
         Use "repo init" to install it here.

进入.repo文件夹

cd ./.repo

初始化repo init 失败

因为每次都要去查询 所以要每次的初始化

repo init

fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 110] Connection timed out

链接仓库失败

修改初始化语句 替换为清华源

repo init -u https://android.googlesource.com/platform/manifest --repo-url https://gerrit-google.tuna.tsinghua.edu.cn/git-repo

还是失败

repo init -u https://android.googlesource.com/p
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值