在安装清华源的repo
下下载android12
的源码进行编译出现这个错误。具体的错误如下。折腾很久。
- 改
Android.bp
, - 进行
config
配置更改好, - 最后的
make -j1
都用上 还是无解:
所有能找的 简书,csdn,startOverflow ,google,bing 都找了 无效
fjasmin@fjasmin-ThinkPad-T460:~$ ls
Android Desktop Pictures Videos
AndroidStudioProjects Documents Public WORKING_DIRECTORY
bin Downloads snap 下载
deepin-wine-for-ubuntu Music Templates 文档
fjasmin@fjasmin-ThinkPad-T460:~$ cd W
bash: cd: W: No such file or directory
fjasmin@fjasmin-ThinkPad-T460:~$ cd WORKING_DIRECTORY/
fjasmin@fjasmin-ThinkPad-T460:~/WORKING_DIRECTORY$ ls
Android.bp compatibility frameworks out system
art cts hardware packages test
bionic dalvik kernel pdk toolchain
bootable developers libcore platform_testing tools
bootstrap.bash development libnativehelper prebuilts WORKSPACE
build device Makefile repo
BUILD external manifest sdk
fjasmin@fjasmin-ThinkPad-T460:~/WORKING_DIRECTORY$ source build/envsetup.sh
fjasmin@fjasmin-ThinkPad-T460:~/WORKING_DIRECTORY$ lunch 2
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=12
TARGET_PRODUCT=aosp_arm64
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.11.0-41-generic-x86_64-Ubuntu-20.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=SD1A.210817.036
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl hardware/google/camera hardware/google/camera/devices/EmulatedCamera
============================================
fjasmin@fjasmin-ThinkPad-T460:~/WORKING_DIRECTORY$ make -j1
22:50:23 ************************************************************
22:50:23 You are building on a machine with 7.63GB of RAM
22:50:23
22:50:23 The minimum required amount of free memory is around 16GB,
22:50:23 and even with that, some configurations may not work.
22:50:23
22:50:23 If you run into segfaults or other errors, try reducing your
22:50:23 -j value.
22:50:23 ************************************************************
build/make/core/soong_config.mk:195: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has
been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.
build/make/core/soong_config.mk:196: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR ha
s been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=12
TARGET_PRODUCT=aosp_arm64
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.11.0-41-generic-x86_64-Ubuntu-20.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=SD1A.210817.036
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl
hardware/google/camera hardware/google/camera/devices/EmulatedCamera
============================================
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basena
me "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER" --t
op "$TOP" --out "out/soong" -n "out" -d "out/soong/build.ninja.d"
-t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-g
lobs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.
available --used_env out/soong/soong.environment.used Android.bp
Killed
23:20:12 soong bootstrap failed with: exit status 1
ninja: build stopped: subcommand failed.
#### failed to build some targets (29:50 (mm:ss)) ####
唯一的解决方案 :更换内存。把内存扩大到 16GB。
别折腾听姐姐的劝。折腾半个月无效~~~ 祝早日编译通过。
20211214 17:29 加了根海力士的8G DDR3L 1600 的内存条,编译系统。编译 Android12 系统已通过。
还得硬件来。硬件好了才行。忘记说了我的笔电是 Thinkpad T460 系统: ubuntu 20.04