【Android Framework 系统开发学习路线图】AOSP 下载报错解决
epo command failed due to the followingerrors:device/generic/goldfish checkout 0daa7615d2ccbe16b735ba3337e7de979f1a3af1platform/development checkout 14be5930030b5b510a050f0b6453f4ae7995b40aGitCommandE
epo command failed due to the following SyncError errors:
device/generic/goldfish checkout 0daa7615d2ccbe16b735ba3337e7de979f1a3af1
platform/development checkout 14be5930030b5b510a050f0b6453f4ae7995b40a
GitCommandError: ‘fetch --quiet --progress aosp --prune --recurse-submodules=no --tags +refs/heads/:refs/remotes/aosp/ +refs/tags/android-14.0.0_r14:refs/tags/android-14.0.0_r14 +refs/tags/:refs/tags/’ on device/generic/arm64 failed
stdout: error: cannot lock ref ‘refs/tags/android-wear-p-preview-2’: Unable to create ‘/mnt/e/aosp/android14/.repo/projects/device/generic/arm64.git/refs/tags/android-wear-p-preview-2.lock’: File exists.
GitCommandError: ‘fetch --quiet --progress aosp --prune --recurse-submodules=no --tags +refs/heads/:refs/remotes/aosp/ +refs/tags/android-14.0.0_r14:refs/tags/android-14.0.0_r14 +refs/tags/:refs/tags/’ on device/generic/mini-emulator-x86 failed
stdout: error: cannot lock ref ‘refs/tags/android-vts-13.0_r12’: Unable to create ‘/mnt/e/aosp/android14/.repo/projects/device/generic/mini-emulator-x86.git/refs/tags/android-vts-13.0_r12.lock’: File exists.
GitCommandError: ‘fetch --quiet --progress aosp --prune --recurse-submodules=no --tags +refs/heads/:refs/remotes/aosp/ +refs/tags/android-14.0.0_r14:refs/tags/android-14.0.0_r14 +refs/tags/:refs/tags/’ on device/generic/mini-emulator-x86_64 failed
stdout: error: cannot lock ref ‘refs/tags/android-8.0.0_r34’: Unable to create ‘/mnt/e/aosp/android14/.repo/projects/device/generic/mini-emulator-x86_64.git/refs/tags/android-8.0.0_r34.lock’: File exists.
+2 additional errors…
aosp 代码量比较大,网大波动都会导致无法正常下载,遇到入这种 “”“8.0.0_r34.lock” 的锁定无法下载的情况,可以直接将对应的位置的代码仓库删除,然后重新sync即可
比如 /mini-emulator-x86_64.git/ 这个仓,明显是因为下载中断导致的代码树不完整,直接删除重新下载即可
rm -rf '/mnt/e/aosp/android14/.repo/projects/device/generic/mini-emulator-x86_64.git
repo sync -fdc --no-tags device/generic/mini-emulator-x86_64 (这里单仓sync)
此外下载代码的小技巧 “depth=1” 可以浅clone
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest -b android-14.0.0_r14 --depth 1 --repo-url=https://mirrors.tuna.tsinghua.edu.cn/git/git-repo --repo-rev=stable
指定repo 地址 是清华源
repo: reusing existing repo client checkout in /mnt/e/aosp/android14
repo sync -fdc --no-tags
更多推荐


所有评论(0)