android-sdk-addon-example icon indicating copy to clipboard operation
android-sdk-addon-example copied to clipboard

Build fail in Android 12: error: overriding commands for target

Open ekt1lud opened this issue 3 years ago • 4 comments

I am trying to use this guide in Android 12, but I encounter an error:

$ . build/envsetup.sh
$ export TARGET=profusion_sdk_addon
$ lunch aosp_x86_64-eng
$ make -j 4 sdk_addon
<snip>
[100% 454/454] writing build rules ...
FAILED: 
build/make/core/tasks/sdk-addon.mk:82: error: overriding commands for target `out/host/linux-x86/obj/SDK_ADDON/profusion_sdk_addon_intermediates/profusion_sdk_addon-eng.<user>-linux-x86-img/', previously defined at build/make/core/tasks/sdk-addon.mk:82
14:59:05 ckati failed with: exit status 1

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

I am using AOSP branch android-12.0.0_r28.

Note: Some other minor errors is encountered when using Android 12 that was easier to solve.

ekt1lud avatar Mar 18 '22 14:03 ekt1lud

Unfortunately, we don't have support for android 12 yet. We have plans to do it in the future, but we cannot give you an estimate when.

oliveirarleo avatar Apr 11 '22 12:04 oliveirarleo

Facing the same issue with android-12.0.0_r25 @ekt1lud are you able to solve it? Any help is deeply appreciated.

trivalent avatar Jun 30 '22 02:06 trivalent

We actually did find a workaround that worked for us. We did not care about the emulator image, so we created an empty file that we used to trick the build system that all the necessary files are present for the emulator build. These lines was added to our makefile:

# Workaround to include files to the emulator image. Adding empty files since we do not care about
# Emulator image.
INSTALLED_QEMU_SYSTEMIMAGE := /path/to/an/empty/file.txt
INSTALLED_QEMU_VENDORIMAGE := /path/to/an/empty/file.txt
INSTALLED_QEMU_RAMDISKIMAGE := /path/to/an/empty/file.txt
QEMU_VERIFIED_BOOT_PARAMS := /path/to/an/empty/file.txt

ekt1lud avatar Jul 04 '22 09:07 ekt1lud

We actually did find a workaround that worked for us. We did not care about the emulator image, so we created an empty file that we used to trick the build system that all the necessary files are present for the emulator build. These lines was added to our makefile:

# Workaround to include files to the emulator image. Adding empty files since we do not care about
# Emulator image.
INSTALLED_QEMU_SYSTEMIMAGE := /path/to/an/empty/file.txt
INSTALLED_QEMU_VENDORIMAGE := /path/to/an/empty/file.txt
INSTALLED_QEMU_RAMDISKIMAGE := /path/to/an/empty/file.txt
QEMU_VERIFIED_BOOT_PARAMS := /path/to/an/empty/file.txt

I tried, but if I remove out/target/product/ and try build again, i still got that issue

Quann0 avatar Jul 25 '23 13:07 Quann0