Android 11 编译报错收集

Aosp 11 编译报错收集

2021-09-20 zhuhongxi


一、构建编译环境过程

二、编译过程

1. 无法安装libesd0-dev
解决办法:
sudo vim /etc/apt/sources.list  //在行尾添加如下两行的内容

deb http://us.archive.ubuntu.com/ubuntu/ xenial main universe
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main universe

更新软件源并重新安装:

sudo apt-get update && sudo apt-get install libesd0-dev
2. libncurses.so.5缺少
FAILED: out/target/product/generic_x86_64/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_element.bc
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bin/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS_VERSION=24 -std=c99 -c -O3 -fno-builtin -e
mit-llvm -target renderscript64-linux-android -fsigned-char -D__x86_64__ -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframeworks/rs/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -x renderscript frameworks/rs/dr
iver/runtime/rs_element.c -o out/target/product/generic_x86_64/obj/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_element.bc"
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
00:04:04 ninja failed with: exit status 1

#### failed to build some targets (11:42 (mm:ss)) ####

解决方法:
sudo apt install apt-file
sudo apt-file update
sudo apt-file find libncurses.so.5
sudo apt install libncurses5

三、启动模拟器

1. 缺少文件userdata-qemu.img
emulator: Android emulator version 30.7.4.0 (build_id 7479360) (CL:N/A)
emulator: WARNING: encryption is off
handleCpuAcceleration: feature check for hvf
cannot add library /root/aosp/prebuilts/android-emulator/linux-x86_64/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed
added library /root/aosp/prebuilts/android-emulator/linux-x86_64/lib64/vulkan/libvulkan.so
emulator: ERROR: VkCommonOperations.cpp:537: Failed to create Vulkan instance.
qemu-system-x86_64: Could not open '/root/aosp/out/target/product/generic_x86_64/userdata-qemu.img': No such file or directory

解决方法:
source build/envsetup.sh
lunch sdk_phone_x86_64
make -jx
emulator
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

坂田民工

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值