1. 程式人生 > >Ubuntu編譯Android問題彙總

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版本,依賴的軟體包很多,都會被解除安裝。