经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » 移动开发 » Android » 查看文章
通过清华TUNA镜像源下载Android源码
来源:cnblogs  作者:小浪渔  时间:2019/1/9 9:29:31  对本文有异议
建议参考官方教程:https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/ 以下为自己测试时执行的步骤: 1、下载repo $ curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo 2、修改权限并拷贝到 PATH 中 $ chmod a+x repo $ sudo mv repo /usr/bin/ 3、使用tuna镜像源更新(需重启模拟终端) $ vi ~/.bashrc export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/' 4、初始化仓库 $ repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest a.过程中如遇到Git错误,设置git config即可 git config --global user.email "you@example.com" git config --global user.name "Your Name" b.如果需要指定Android版本 $ repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android版本 5、同步源码(代码比较大,耗时比较久) $ repo sync