Android6.0编译错误总结

目录

Repo Init Fatal: error unknown url type https

repo init 报错 SSL: CERTIFICATE_VERIFY_FAILED

aidl_language_l 编译报错


Repo Init Fatal: error unknown url type https

这是由于缺少ssl导致

sudo apt-get install libssl-dev

如果是自己编译安装的python,重新configure 并编译安装

repo init 报错 SSL: CERTIFICATE_VERIFY_FAILED

fatal: Cannot get https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/clone.bundle
fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)
fatal: cloning the git-repo repository failed, will remove '.repo/repo'

解决办法:在repo文件脚本中加入如下代码,如果执行是提示ssl没有这个成员,将默认python设置为python3,下载完后再改为python2

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

aidl_language_l 编译报错


Notice file: frameworks/base/tools/aidl/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//bin/aidl.txt
frameworks/base/tools/aidl/aidl_language_l.l:55: warning, 无法匹配规则
prebuilts/misc/linux-x86/bison/bison: m4 子进程失败
flex-2.5.39:严重内部错误,exec of /usr/bin/m4 failed
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] 错误 1
make: *** 正在等待未完成的任务....
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] 错误 1
make: *** 正在删除文件“out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp”

 或

make: *** [build/core/binary.mk:646: out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] 已放弃 (核心已转储)

解决办法,将LC_ALL=C添加~/.bashrc 或环境变量中

export LC_ALL=C

ERROR: Communication error with Jack server (2)

网上有很多教程说是配置jack端口号的,但是看着比较麻烦,要改两个问题,我没有尝试,感兴趣的可以试试,我这边是直接禁用了jack

make ANDROID_FORCE_JACK_ENABLED=disabled -j32
或者 export ANDROID_FORCE_JACK_ENABLED=disabled

你可能感兴趣的:(aosp,编译构建,Android,android,AOSP)