"Failed to build some targets" 正在为 Dragonboard (Ubuntu 16.04) 构建 Android 开源项目 (AOSP)

"Failed to build some targets" while Building Android Open Source Project (AOSP) for Dragonboard (Ubuntu 16.04)

我正在尝试在 Ubuntu 16.04: https://www.96boards.org/documentation/consumer/dragonboard/guides/aosp/ 完成这里提到的程序。 由于我遇到错误之前的步骤会产生广泛的结果并且我已经 运行 成功,所以我提到了我面临问题的步骤。请注意教程占用太多存储空间 space.

当我尝试构建 AOSP 的第三步时:

make -j$(nproc)

错误率在 97% 左右,如下所示:

goroutine 689209 [runnable]:
android/soong/android.(*ModuleBase).computeInstallDeps(0xc058a41000, 0xa87f40, 0xc08bcb6b60, 0x9a51a1, 0x7, 0xc000024467)
    /home/Username/android_top/build/soong/android/module.go:628 +0x7c
android/soong/android.(*ModuleBase).GenerateBuildActions(0xc058a41000, 0xa87f40, 0xc08bcb6b60)
    /home/Username/android_top/build/soong/android/module.go:791 +0xec
github.com/google/blueprint.(*Context).generateModuleBuildActions.func2.1(0xc01a5c5980, 0xc08bcb6b60)
    /home/Username/android_top/build/blueprint/context.go:2303 +0x80
github.com/google/blueprint.(*Context).generateModuleBuildActions.func2(0xc01a5c5980, 0x0)
    /home/Username/android_top/build/blueprint/context.go:2304 +0x335
github.com/google/blueprint.(*Context).parallelVisit.func1.1(0xc0082e1500, 0xc01a5c5980, 0xc00e616360, 0xc00e616120)
    /home/Username/android_top/build/blueprint/context.go:1709 +0x30
created by github.com/google/blueprint.(*Context).parallelVisit.func1
    /home/Username/android_top/build/blueprint/context.go:1708 +0x124
06:38:10 soong bootstrap failed with: exit status 1
ninja: build stopped: subcommand failed.
#### failed to build some targets (06:24 (mm:ss)) ####

我收到此错误的任何可能原因?我也无法在其他地方找到具体的解决方案。

我找到了答案,它是内存不足错误。代码没有错。希望对遇到类似问题的人有所帮助!