大约一两年前,我使用并成功编译和安装了 AOSP。我正在尝试重新启动并在其中运行以进行一些开发。但是,我不断收到此错误:
Fetching projects: 100% (486/486), done.
Traceback (most recent call last):
File "/home/hoshi/WORKING_DIRECTORY/.repo/repo/main.py", line 500, in <module>
_Main(sys.argv[1:])
File "/home/hoshi/WORKING_DIRECTORY/.repo/repo/main.py", line 476, in _Main
result = repo._Run(argv) or 0
File "/home/hoshi/WORKING_DIRECTORY/.repo/repo/main.py", line 155, in _Run
result = cmd.Execute(copts, cargs)
File "/home/hoshi/WORKING_DIRECTORY/.repo/repo/subcmds/sync.py", line 675, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/hoshi/WORKING_DIRECTORY/.repo/repo/project.py", line 1204, in Sync_LocalHalf
lost = self._revlist(not_rev(revid), HEAD)
File "/home/hoshi/WORKING_DIRECTORY/.repo/repo/project.py", line 2241, in _revlist
return self.work_git.rev_list(*a, **kw)
File "/home/hoshi/WORKING_DIRECTORY/.repo/repo/project.py", line 2435, in rev_list
p.stderr))
error.GitError: device/lge/mako-kernel rev-list ('^7bf237bdf8a8c6d516219dc09b3bc114aa0e863d', 'HEAD', '--'): fatal: bad object HEAD
这发生在成功“获取所有包”(上述终端输出的第一行)之后。我尝试删除 WORKING_DIRECTORY 中的 .repo 文件夹并在那里重新初始化 repo。我认为它解决了这个问题,但在同步几个小时后再次出现错误!我已经从各种讨论/论坛中尝试了几种解决方案,但似乎无法弄清楚。
任何帮助找到解决方案将不胜感激!