[英]Android Repo sync Fatal error
$ repo sync
for $ repo sync
Build LMY47V android-5.1.1_r1 Lollipop 构建LMY47V android-5.1.1_r1棒棒糖
results into error: 结果变成错误:
Fetching projects: 62% (302/486) Fetching project platform/frameworks/base
fatal: Not a git repository: '/home/ashish/askdnx/.repo/projects/frameworks/base.git'
The repo sync goes on for sometime and then fails with errors. 回购同步持续一段时间,然后失败并显示错误。
What could be a fix for this ? 有什么解决办法? Can I use 我可以用吗
$ git clone https://android.googlesource.com/platform/frameworks/base.git
You should not use git clone
to checkout Android source code. 您不应该使用git clone
检出Android源代码。
Use repo
all the way: 一直使用repo
:
curl https://storage.googleapis.com/git-repo-downloads/repo > repo
chmod a+x repo
repo init -u --config-name https://android.googlesource.com/platform/manifest -b android-5.1.1_r1
repo sync
If that does not work, clean up your repo files: 如果这样不起作用,请清理您的回购文件:
rm -rf ~/.repo/
Find all necessary .git files in .repo directory and delete them. 在.repo目录中找到所有必需的.git文件并将其删除。 For me, it was working ok 对我来说,一切正常
Only solution I found to fix the above problem is to start FRESH. 我发现解决以上问题的唯一方法是启动FRESH。
As per the above post 根据以上职位
rm -rf ~/.repo/
didnt quite remove the files for me. 并没有为我删除文件。 Please try that too. 请尝试一下。 Thanks to @shkschneider for giving that answer. 感谢@shkschneider给出的答案。 So bascially you have to remove bin folder and the .repo folder manually before you start fresh. 因此,基本上,您必须在开始全新操作之前手动删除bin文件夹和.repo文件夹。
Tips for starting fresh: 重新开始的提示:
USE repo sync -j1
for sync the Android Source Tree. 使用repo sync -j1
同步Android源代码树。 It takes time but it is the best solution to problems like remote hung up unexpectedly. 这需要时间,但它是解决远程挂断等问题的最佳解决方案。 I may be wrong in this. 我可能是错的。 but none of the methods found on the internet helped me. 但互联网上找不到的方法对我有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.