profusion / android-sdk-addon-example

Apache License 2.0
23 stars 6 forks source link

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

Open ekt1lud opened 2 years ago

ekt1lud commented 2 years ago

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.

oliveirarleo commented 2 years ago

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.

trivalent commented 2 years ago

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

ekt1lud commented 2 years ago

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
Quann0 commented 1 year ago

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