sonyxperiadev/bug_tracker

"Specifies both LOCAL_SDK_VERSION (system_current) and LOCAL_PRIVATE_PLATFORM_APIS (true) but should specify only one" while compiling Android 12

KnuX opened this issue · 1 comments

KnuX commented

Platform: aosp_arm64-eng
Device: F5321
Kernel version:
Android version: AOSP 12 from your guide
Software binaries version:

Previously working on
N/A

Description
Build is not possible because of this error.

$ make -j4
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 has 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.4.0-186-generic-x86_64-Ubuntu-20.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=SQ1A.220205.002
OUT_DIR=out
============================================
[ 67% 156/230] including packages/apps/ExtendedSettings/Android.mk ...
FAILED:
packages/apps/ExtendedSettings/Android.mk: error: ExtendedSettings: Specifies both LOCAL_SDK_VERSION (system_current) and LOCAL_PRIVATE_PLATFORM_APIS (true) but should specify only one
In file included from build/make/core/clear_vars.mk:501:
In file included from packages/apps/ExtendedSettings/Android.mk:29:
In file included from build/make/core/package.mk:50:
In file included from build/make/core/package_internal.mk:363:
In file included from build/make/core/java.mk:162:
build/make/core/sdk_check.mk:34: error: done.
21:58:26 ckati failed with: exit status 1

#### failed to build some targets (45:16 (mm:ss)) ####

Even if I bypass this error (for curiosity), another will be trigger later:

wildcard(out/target/product/generic_arm64/clean_steps.mk) was changed, regenerating...
[ 96% 1214/1253] including system/sepolicy/Android.mk ...
system/sepolicy/Android.mk:57: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.
system/sepolicy/Android.mk:62: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
FAILED: ninja: 'kernel/prebuilts/4.19/arm64/kernel-4.19-gz', needed by 'out/target/product/generic_arm64/kernel-4.19-gz', missing and no known rule to make it
10:56:15 ninja failed with: exit status 1

I follow this legacy guide : https://developer.sony.com/open-source/aosp-on-xperia-open-devices/guides/aosp-build-instructions/build-aosp-android-12-0/

I don't know so much about android build from source to find a solution myself :(

Regards,

F5321 is discontinued from Android 10
you can try to enable the target locally and use Android 10 blobs