aosp源代码更新到android-14.0.0_r29(Build ID:AP1A.240305.019.A1)或更新版本,lunch会失败,

1
2
3
4
5
6
7
8
9
10
11
12
tangorpro14$ lunch

You're building on Linux

**Warning: Cannot display lunch menu.**

Note: You can invoke lunch with an explicit target:

usage: lunch [target]

Which would you like? [aosp_cf_x86_64_phone-trunk_staging-eng]
Pick from common choices above (e.g. 13) or specify your own (e.g. aosp_barbet-trunk_staging-eng):

查看./build/envsetup.sh ,

这个选择列表是有脚本函数get_build_var COMMON_LUNCH_CHOICES来生成,在命令行里执行后:

1
2
3
4
5
$get_build_var COMMON_LUNCH_CHOICES
In file included from build/make/core/config.mk:380:
In file included from build/make/core/envsetup.mk:51:
build/make/core/release_config.mk:136: error: No release config set for target; please set TARGET_RELEASE, or if building on the command line use 'lunch <target>-<release>-<build_type>', where release is one of: ap2a.
16:37:38 dumpvars failed with: exit status 1

提示需要please set TARGET_RELEASE。并且也给出了提示: where release is one of: ap2a.

因此可以直接输入 编译的target

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$lunch  aosp_tangorpro-ap2a-userdebug
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=14
PRODUCT_INCLUDE_TAGS=com.android.mainline mainline_module_prebuilt_nightly
TARGET_PRODUCT=aosp_tangorpro
TARGET_BUILD_VARIANT=userdebug
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-2a
TARGET_CPU_VARIANT=cortex-a55
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_OS=linux
HOST_OS_EXTRA=Linux-6.2.0-33-generic-x86_64-Ubuntu-22.04.3-LTS
HOST_CROSS_OS=windows
BUILD_ID=AP2A.240605.024
OUT_DIR=out
============================================