Ubuntu编译Android问题汇总

1. 错误日志:
flex-2.5.39: loadlocale.c:130:_nl_intern_locale_data: ?? 'cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' ???
Aborted (core dumped)
[ 6% 3452/56388] //frameworks/base/libs/androidfw:libandroidfw clang++ ResourceTypes.cpp [linux]
ninja: build stopped: subcommand failed.
解决方法:
export LC_ALL=C。不可以修改~/.bashrc,会导致终端内中文显示为数字(应该是对应的编码)

2. 错误日志:
**FAILED: gensecimage_target** 
/bin/bash -c "(rm -rf out/target/product/FJDEV061/signed ) && (SECIMAGE_LOCAL_DIR=vendor/qcom/proprietary/common/scripts/SecImage USES_SEC_POLICY_MULTIPLE_DEFAULT_SIGN=1 USES_SEC_POLICY_DEFAULT_SUBFOLDER_SIGN= USES_SEC_POLICY_INTEGRITY_CHECK=1 python vendor/qcom/proprietary/common/scripts/SecImage/sectools_builder.py -i out/target/product/FJDEV061/emmc_appsboot.mbn -t vendor/qcom/proprietary/common/scripts/SecImage/signed -g appsbl --config=vendor/qcom/proprietary/common/scripts/SecImage/config/integration/secimage.xml --install_base_dir=out/target/product/FJDEV061 > out/target/product/FJDEV061/secimage.log 2>&1 ) && (echo Completed secimage signed appsbl \\(logs in out/target/product/FJDEV061/secimage.log\\) )"
[  0% 935/100297] host C++: libsettings_32 <= vendor/qcom/proprietary/qcril/settingsd/commands/ConsoleSource.cpp
ninja: build stopped: subcommand failed.
11:38:32 ninja failed with: exit status 1
解决方法:
Ubuntu 18.04默认openssl版本太高(1.1.0g),需要到https://www.openssl.org/source/old/1.0.2/ 下载旧版本,按照INSTALL中的描述install,然后编译前修改环境变量指向该版本即可。千万不可以卸载自带的openssl版本,依赖的软件包很多,都会被卸载。

猜你喜欢

转载自blog.csdn.net/Neuuranus/article/details/85261052