Hi.
The library doesn't need to be referenced in PRODUCT_PACKAGES, as it seems that
it's not what it is. Your jar does however need to be accessible to Soong, e.g.
in the 'prebuilts' project that Soong queries for all libraries (less likely)
or in a path relative to your app's Android.bp (more likely). For example,
copy the jar to your app's 'lib' folder and change
java_import {
name: "my-services",
- jars: ["my-services.jar"],
+ jars: ["lib/my-services.jar"],
}
Next, in your build target, e.g. android_app, refer to the library by its
java_import/name ("my-services" in your case) in one of the libraries blocks
(depending on how you want it linked). That should be about it. Good luck.
Cheers
Zoran Jovanovic
SW Architect
Sony Mobile Communications Inc.
Lund, Sweden
________________________________
From: [email protected] <[email protected]> on
behalf of Ajay kumar <[email protected]>
Sent: Tuesday, November 20, 2018 13:49
To: Android Building
Subject: [android-building] How to include prebuilt jars using bp in Android P
Hi
Added jar file :
this my Android.bp
java_import {
name: "my-services",
jars: ["my-services.jar"],
}
am getting build error :
ninja: error:
'out/target/common/obj/JAVA_LIBRARIES/my-services_intermediates/javalib.jar',
needed by
'out/target/product/mydevice/dex_bootjars/system/framework/arm64/boot.art',
missing and no known rule to make it
I've added my-services in base.mk<http://base.mk/> under
build/make/target/product/ and device/google/mydevice.mk<http://mydevice.mk/>
to PRODUCT_PACKAGES.
Thanks
Ajay
--
--
You received this message because you are subscribed to the "Android Building"
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the "Android Building"
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.