wu tony
wu tony

Reputation: 23

build aosp sample sdk addon failed due to No rule to make target `images/source.properties'

I have synced android 5.1.1,then I want to build sample sdk addon,but it failed with following info:

make -j8 PRODUCT-sample_addon-sdk_addon

... make: * No rule to make target images/source.properties', needed byout/host/linux-x86/obj/SDK_ADDON/platform_library_intermediates/platform_library-eng.tonywu-linux-x86-img'. Stop. make: * Waiting for unfinished jobs....

I also googled online but didn't find any clue of similar failure.

Upvotes: 0

Views: 827

Answers (2)

Rahul Shukla
Rahul Shukla

Reputation: 1292

For those who are still looking on how to build sample add-on on the latest AOSP source checkout (Android 12L), here is the guide:

This error is immortal. This is 2022, Android has jumped to 12 but it still hails.

You solve this and another one greets you:

FAILED: ninja: 'out/target/common/docs/platform_library-timestamp', needed by 'out/host/linux-x86/sdk_addon/platform_library-eng.-linux-x86.zip', missing and no known rule to make it

Apparently, the task "javadoc" defined in device/sample/frameworks/PlatformLibrary/Android.bp doesn't execute (or succeeds, don't know, couldn't figure it out), causing this dependency to be pending.

To solve this, you need to comment out the below line in device/sample/products/sample_addon.mk PRODUCT_SDK_ADDON_DOC_MODULES := platform_library

Hope this helps someone stuck!

Hail ANDROID!

Upvotes: 1

wu tony
wu tony

Reputation: 23

Solution,you need to make 2 changes on top of AOSP code:

  1. Create file source.properties under device/sample/sdk_addon
  2. Add one line in sample_addon.mk:

PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP := $(LOCAL_PATH)/source.properties

Upvotes: 1

Related Questions