I am going through the exact same thing, I can't get the caller to pick up the package from my library. Any updates?
On Wednesday, 26 September 2018 09:51:25 UTC-4, shankar kumar yellapu wrote: > > Hi Dan, > > I've given a fresh build, now I'm getting new error as follows: > > 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 under build/make/target/product/ and > device/google/mydevice.mk to PRODUCT_PACKAGES. > > Is there anything I'm missing?? > > -Shankar > > On Wednesday, September 26, 2018 at 4:37:14 AM UTC+5:30, Dan Willemsen > wrote: >> >> To compile that >> frameworks/base/services/core/java/com/example/sevice/myservice.java file, >> you'd need to add your lib to the libs section of services.core.unboosted >> in frameworks/base/services/core/Android.bp. >> >> - Dan >> >> On Tue, Sep 25, 2018 at 10:23 AM shankar kumar yellapu < >> [email protected]> wrote: >> >>> Hi Dan, >>> Thanks for quick reply, But my actual import from >>> frameworks/base/services/core/java/com/example/sevice/myservice.java is >>> saying error: package com.my.service.addon does not exist. >>> >>> If I give mm in frameworks/base/services/myservices/ says build >>> successful. >>> >>> My Android.bp under /frameworks/base/services/ is as following: >>> >>> // merge all required services into one jar >>> // ============================================================ >>> java_library { >>> name: "services", >>> >>> dex_preopt: { >>> app_image: true, >>> profile: "art-profile", >>> }, >>> >>> srcs: [ >>> "java/**/*.java", >>> ], >>> >>> // The convention is to name each service module >>> 'services.$(module_name)' >>> static_libs: [ >>> "services.core", >>> "services.accessibility", >>> "services.appwidget", >>> "services.autofill", >>> "services.backup", >>> "services.companion", >>> "services.coverage", >>> "services.devicepolicy", >>> "services.midi", >>> "services.net", >>> "services.print", >>> "services.restrictions", >>> "services.usage", >>> "services.usb", >>> "services.voiceinteraction", >>> "android.hidl.base-V1.0-java", >>> ], >>> >>> libs: [ >>> "android.hidl.manager-V1.0-java", >>> "my-services", >>> ], >>> >>> // Uncomment to enable output of certain warnings (deprecated, >>> unchecked) >>> //javacflags: ["-Xlint"], >>> >>> } >>> >>> // native library >>> // ============================================================= >>> >>> cc_library_shared { >>> name: "libandroid_servers", >>> defaults: ["libservices.core-libs"], >>> whole_static_libs: ["libservices.core"], >>> } >>> >>> am I missing anything here??? >>> >>> Thanks, >>> Shankar >>> >>> On Tuesday, September 25, 2018 at 2:35:38 AM UTC+5:30, Dan Willemsen >>> wrote: >>>> >>>> You'll need to define your prebuilt using java_import: >>>> >>>> java_import { >>>> name: "my-services", >>>> jars: ["my-services-prebuilt.jar"], >>>> } >>>> >>>> You shouldn't need the my-services vs my-services-prebuilt >>>> differentiation like you did with make. >>>> >>>> - Dan >>>> >>>> On Mon, Sep 24, 2018 at 8:11 AM shankar kumar yellapu < >>>> [email protected]> wrote: >>>> >>>>> Hi, >>>>> >>>>> I'm trying to include a jar in /frameworks/base/services/myservice >>>>> using bp . My bp file looks like this: >>>>> >>>>> java_library_static { >>>>> name: "my-service", >>>>> static_libs: ["my-services-prebuilt"], >>>>> } >>>>> >>>>> I've copied my prebuilt jar in the same location with the name >>>>> my-services-prebuilt. I'm getting the following error: >>>>> >>>>> error: >>>>> frameworks/base/services/my-services/Android.bp:29:1:"my-services" >>>>> depends >>>>> on undefined module ",my-services-prebuilt" >>>>> >>>>> FYR: my make file in Android O >>>>> >>>>> LOCAL_PATH:= $(call my-dir) >>>>> >>>>> # static jar >>>>> # ============================================================ >>>>> include $(CLEAR_VARS) >>>>> LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := >>>>> my-services-prebuilt:my-services-prebuilt.jar >>>>> include $(BUILD_MULTI_PREBUILT) >>>>> >>>>> # shared jar >>>>> # ============================================================ >>>>> include $(CLEAR_VARS) >>>>> LOCAL_MODULE := my-services >>>>> LOCAL_MODULE_TAGS := optional >>>>> LOCAL_STATIC_JAVA_LIBRARIES := my-services-prebuilt >>>>> include $(BUILD_JAVA_LIBRARY) >>>>> endif >>>>> >>>>> >>>>> Can anybody tell me what I'm doing wrong?? Please send me proper bp >>>>> script. >>>>> >>>>> Regards, >>>>> Shankar >>>>> >>>>> -- >>>>> -- >>>>> 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. >>>>> >>>> -- >>> -- >>> 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. >>> >> -- -- 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.
