我正在尝试在我的 Linux 系统上下载 Android 开源代码。我已经执行了 mkdir、curl 和 repo init 的初始命令,然后执行了 repo sync 命令,但一段时间后它显示“由于获取错误 android,错误退出同步”。然后我再次执行 repo sync 命令,但一段时间后显示如下:
Downloading packages/apps/Settings: 75% (56MB/74MB) Exception in thread Thread-150:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/ingrid/.repo/repo/subcmds/sync.py", line 200, in _FetchHelper
clone_bundle=not opt.no_clone_bundle)
File "/home/ingrid/.repo/repo/project.py", line 968, in Sync_NetworkHalf
and self._ApplyCloneBundle(initial=is_new, quiet=quiet):
File "/home/ingrid/.repo/repo/project.py", line 1526, in _ApplyCloneBundle
exist_dst = self._FetchBundle(bundle_url, bundle_tmp, bundle_dst, quiet)
File "/home/ingrid/.repo/repo/project.py", line 1590, in _FetchBundle
raise DownloadError('%s: %s ' % (req.get_host(), str(e)))
DownloadError: android.googlesource.com: <urlopen error [Errno 104] Connection reset by peer>
你能告诉我为什么会显示这个吗?
谢谢。
最佳答案
我认为问题是该项目已部分同步,然后您的 Internet 连接已中断。因此,不可能同步所有树。之后您尝试继续同步,但由于某些文件已经下载,您会遇到这些错误。
尝试删除您的源文件夹,然后再次重新初始化它。有时候会出现安卓源无法同步的情况。
关于android - 下载 Android 开源代码时出现 "Error exited sync due to fetch errors android",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11628449/