I have the same problem too.

I have a prebuilt jar that needs to be brought in, I have tried both 
java_import and java_library directives and neither works. Ideas?

>>> java_import - seems to only create immediates but doesn't actually 
bring the the jar to my target directory 
java_import {
      name: "myPrebuiltJar",
      jars: ["myPrebuiltJar.jar"],
  }

>>> java_library - I see some immediates and the jar in my target 
directory, but callers that makes use of the library do not recognize / 
cannot import my package (build time error)
java_library {
    name: "myPrebuiltJar",
    srcs: ["myPrebuiltJar.jar"],
    installable: true,
}

On Wednesday, 5 December 2018 12:26:29 UTC-5, Zoran Jovanovic wrote:
>
> Ah, sorry for misunderstanding. 
>
>
> Put "installable: true" somewhere under "java_library" in your library's 
> blueprint. 
>
>
> Cheers 
>
> -- 
>
> Zoran Jovanovic 
> SW Architect 
> Sony Mobile Communications Inc. 
> Lund, Sweden 
>
>
> ________________________________ 
> From: [email protected] <javascript:> <
> [email protected] <javascript:>> on behalf of Ajay kumar <
> [email protected] <javascript:>> 
> Sent: Wednesday, November 28, 2018 08:51 
> To: Android Building 
> Subject: [android-building] Re: How to include prebuilt jars using bp in 
> Android P 
>
> Hi Zoran, 
> Thanks for your reply. 
> Our intention is to include this jar in system/frameworks as like 
> frameworks.jar(which has been built on an engineering environment), it has 
> to be used by a system service in frameworks. can you tell me how this can 
> be achievable ?? 
>
> Thanks, 
> Ajay 
>
> On Tuesday, November 20, 2018 at 9:02:21 PM UTC+5:30, Ajay kumar wrote: 
> 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] 
> <javascript:> 
> To unsubscribe from this group, send email to 
> [email protected] <javascript:> 
> 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] <javascript:><mailto:
> [email protected] <javascript:>>. 
> 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.

Reply via email to