Ubuntu 18.04 编译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版本,依赖的软件包很多,都会被卸载。

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值