编译安卓代码有如下报错怎么解决FAILED: out/soong/build.ninja cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" -o out/soong/build.ninja --globListDir build --globFile out/soong/globs-build.ninja -t -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.build Android.bp InitTmsEnv: err1 = open vendor/tms/proprietary/conf/nfc/hw/tms_env.sh: no such file or directory InitTmsEnv: path1 = vendor/tms/proprietary/conf/nfc/hw/tms_env.sh GetCrootPath: path = /home/joey/my_work/sprd/C9000U/out/host/linux-x86/bin/../../../.. sven version name : 13 sven version number: 13 binSeGetProps: USE_C1= binSeGetProps: USE_TMS_NFC= true lib7816GetProps: USE_C1= lib7816GetProps: USE_TMS_NFC= true libTmsDlCommonGetProps: USE_C1= libTmsDlCommonGetProps: USE_TMS_NFC= true camera device DEBUG_MALLOC Off libTmsDlReeGetProps: USE_C1= libTmsDlReeGetProps: USE_TMS_NFC= true libTmsDlTeeGetProps: USE_C1= libTmsDlTeeGetProps: USE_TMS_NFC= true DEBUG_MALLOC_OFF Killed 07:23:12 soong bootstrap failed with: exit status 1 ninja: build stopped: subcommand failed. #### failed to build some targets (19:09 (mm:ss)) #### ===============BUILD TIME ANALYSIS=============== [total build time 0:34:21 (hh:mm:ss)] bsp build time: 0:15:12(44.25%) android build time: 0:19:09(55.75%) [android build]regen: 0:19:09(100.00%) [android build]real build: 0:00:00(0.00%) [android build time details] startup: 99.50ms(0.00%) find modules: 371.32ms(0.02%) [total]path: 430.37ms(0.02%) [total]dumpvars: 9,391.34ms(0.46%) [total][soong]blueprint bootstrap: 4,858.69ms(0.24%) [total][soong]environment check: 0.02ms(0.00%) [total][soong]bpglob: 313.70ms(0.02%) [total][soong]bootstrap: 1,133,323.78ms(54.99%) [total]soong: 1,138,498.31ms(55.24%) [total]dist: 0.56ms(0.00%) total: 1,148,322.27ms(55.72%) upload_metrics: 0.05ms(0.00%) [build command] build/soong/soong_ui.bash --make-mode -j64 ===============BUILD TIME ANALYSIS===============
时间: 2024-03-10 13:50:11 浏览: 982
这个错误消息显示 soong build 失败了,其中一个可能的原因是缺少依赖项。你可以尝试运行以下命令:
```
make clean
make -j4
```
这将清除 build 目录并重新编译 Android 代码。如果这不起作用,你需要检查错误消息中提到的文件路径是否存在,以及是否缺少其他依赖项。你也可以尝试在编译过程中打开详细的日志记录,查找更多有用的信息。
相关问题
============================================ [100% 1/1] analyzing Android.bp files and generating ninja file at out/soong/build.ninja FAILED: out/soong/build.ninja cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" -o out/soong/build.ninja --globListDir build --globFile out/soong/globs-build.ninja -t -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.build Android.bp Clang SA is not enabled error: vendor/qcom/proprietary/commonsys/securemsm/GPSample/app/src/main/cpp/Android.bp:92:1: "libgpSample2TA.qti" depends on undefined module "libGPTEE_system.qti" error: vendor/qcom/proprietary/commonsys/securemsm/GPSample/app/src/main/cpp/Android.bp:92:1: "libgpSample2TA.qti" depends on undefined module "libGPMTEEC_system.qti" error: vendor/qcom/proprietary/commonsys/securemsm/GPSample/app/src/main/cpp/Android.bp:68:1: "libGPComm.qti" depends on undefined module "libGPTEE_system.qti" error: vendor/qcom/proprietary/commonsys/securemsm/GPSample/app/src/main/cpp/Android.bp:68:1: "libGPComm.qti" depends on undefined module "libGPMTEEC_system.qti" ninja: build stopped: subcommand failed. 18:01:10 soong bootstrap failed with: exit status 1
这是一个错误提示,似乎在编译 Android 应用时出现了问题。你需要检查一下 Android.bp 文件中的依赖项,特别是 libgpSample2TA.qti 和 libGPComm.qti 依赖的 libGPTEE_system.qti 和 libGPMTEEC_system.qti 是否已经正确定义。另外,你也需要确保 Clang SA 已经被启用。如果以上方法无法解决问题,你可以尝试重新编译或者查看更详细的错误日志来定位问题。
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja FAILED: out/soong/build.ninja cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --out "out/soong" -n "out" -d "out/soong/build.ninja.d" -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp nxmediaplayermanager init start nxmediaplayerwrapper init start display_client Include_dirs: [vendor/huanglong/uapi/dispmng/include vendor/huanglong/uapi/pdm/include vendor/huanglong/linux/include/generic vendor/huanglong/uapi/include/video vendor/huanglong/uapi/vo/include vendor/huanglong/uapi/panel/include vendor/huanglong/uapi/include/cec vendor/huanglong/uapi/pmoc/include vendor/huanglong/uapi/gpio/include vendor/huanglong/uapi/ir/include vendor/platform/secure_c/include] error: frameworks/base/cmds/bootanimation/Android.bp:36:1: "bootanimation" depends on undefined module "skybootanimation_defaults" ninja: build stopped: subcommand failed. 05:59:24 soong bootstrap failed with: exit status 1
这个错误提示与之前的错误提示很相似,也是因为 "bootanimation" 模块依赖了一个未定义的模块 "skybootanimation_defaults"。所以,解决方法也与之前类似。
你需要检查以下几个方面:
1. 检查是否有名为 "skybootanimation_defaults" 的模块存在。如果不存在,则需要添加该模块。
2. 检查 "skybootanimation_defaults" 模块的路径是否正确。如果路径错误,也会导致找不到该模块的错误。
3. 检查 "bootanimation" 模块的依赖是否正确。如果依赖的模块名称或路径错误,也会导致找不到模块的错误。
一般来说,这种错误提示都是由于模块依赖关系配置不正确引起的。检查以上几个方面,应该可以解决这个问题。
阅读全文