下载Android源代码时出错。

时间:2022-12-13 14:09:22

I am trying to download the android source code and for that I am following official documents provided on source.android.com, using command :-

我正在尝试下载android的源代码,我正在使用source.android.com提供的官方文件,使用命令:-。

repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r1

or

repo init -u https://android.googlesource.com/platform/manifest 

but I am getting following error :-

但我有以下错误:-。

fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno -2] Name or service not known

I am not able to figure out where I am doing it wrong !! any lead is appreciated.

我不能弄清楚我在哪里做错了!!任何领导赞赏。

Update

更新

I went ahead with following command :-

我继续下面的命令:-。

repo init -u https://android.googlesource.com/platform/manifest -b android-4.4_r1

and then executed repo sync , everything was working fine but at last i got this error :-

然后执行repo sync,一切正常,但最后我得到了这个错误:-。

100 10.8G  100 10.8G    0     0   259k      0 12:12:36 12:12:36 --:--:--  895k
remote: Sending approximately 10.88 GiB ...
remote: Counting objects: 46, done
remote: Finding sources: 100% (40/40)
error: RPC failed; result=56, HTTP code = 200 | 915.00 KiB/s      
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
remote: Sending approximately 10.88 GiB ...
remote: Counting objects: 46, done
remote: Finding sources: 100% (40/40)
error: RPC failed; result=56, HTTP code = 200 | 881.00 KiB/s      
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
error: Cannot fetch device/lge/hammerhead-kernel

any lead on this is appreciated !!

这方面的任何线索都值得赞赏!!

1 个解决方案

#1


2  

There have been 4 commits to git-repo just a few hours ago, all regarding clone.bundle cookies, except the first of those. If your problem is still going on, use the stable branch, which is before today's commits. I setup a server yesterday, so I know it works fine. The last commit, before those 4 was from 12 days ago. In order to use a specific branch, tag, or commit you use --repo-branch and you can also use --repo-url to download git-repo from another website, but you shouldn't need that, just do this to use the version before today's commits. First make sure you remove any bad or problem version and partial info, by removing the .repo subdirectory from your working directory, by running:

几个小时前就有4个提交给git-repo,都是关于克隆的。捆绑饼干,除了第一个。如果您的问题还在继续,使用稳定的分支,这是在今天提交之前。我昨天安装了一台服务器,所以我知道它运行良好。最后一次提交,在那之前的4天是12天前。为了使用特定的分支、标记或提交,您可以使用repo-url从另一个网站下载git-repo,但是您不需要这样做,只是在今天提交之前使用这个版本。首先,通过运行:从工作目录中删除.repo子目录,以确保删除任何错误或问题版本和部分信息。

rm -rf .repo

rm射频.repo

Then run:

然后运行:

repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.2_r1 --repo-branch stable

repo-branch稳定。

#1


2  

There have been 4 commits to git-repo just a few hours ago, all regarding clone.bundle cookies, except the first of those. If your problem is still going on, use the stable branch, which is before today's commits. I setup a server yesterday, so I know it works fine. The last commit, before those 4 was from 12 days ago. In order to use a specific branch, tag, or commit you use --repo-branch and you can also use --repo-url to download git-repo from another website, but you shouldn't need that, just do this to use the version before today's commits. First make sure you remove any bad or problem version and partial info, by removing the .repo subdirectory from your working directory, by running:

几个小时前就有4个提交给git-repo,都是关于克隆的。捆绑饼干,除了第一个。如果您的问题还在继续,使用稳定的分支,这是在今天提交之前。我昨天安装了一台服务器,所以我知道它运行良好。最后一次提交,在那之前的4天是12天前。为了使用特定的分支、标记或提交,您可以使用repo-url从另一个网站下载git-repo,但是您不需要这样做,只是在今天提交之前使用这个版本。首先,通过运行:从工作目录中删除.repo子目录,以确保删除任何错误或问题版本和部分信息。

rm -rf .repo

rm射频.repo

Then run:

然后运行:

repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.2_r1 --repo-branch stable

repo-branch稳定。