And the point around not being about to load classes runtime from a an aar: https://stackoverflow.com/questions/48716303/how-to-load-class-dynamically-from-aar-file-with-dexclassloader
The above principal at least should work for a jar file only... (for my needs I should be able to strip down to a jar file instead of aar). I think to add resources to this approach one would need to overlay the framework's resources (out of scope for my needs) On Monday, September 28, 2020 at 4:23:15 AM UTC+3 George Vlahakis wrote: > Dear all, > > I found that adding the module name to PRODUCT_PACKAGES at least copies > the aar files in the target folder. > > I do not know if it will now be possible to dynamically load the aar (like > a jar) and use it in an APK. Will try and report with in. > > Thanks > > On Monday, September 28, 2020 at 4:11:04 AM UTC+3 George Vlahakis wrote: > >> I need to add a couple of aar's in system/framework folder to be >> available by the custom device developers to use in their applications. >> >> I have already managed to compile and include normal JAR files to this >> folder during AOSP build, but I am having trouble figuring out what needs >> to be the content of my Android.mk file to copy pre-built aar files to the >> system/framework. >> >> Already added them in PRODUCT_BOOT_JARS. >> >> Sample of my Android.mk: >> >> include $(CLEAR_VARS) >> LOCAL_MODULE := moduleName >> LOCAL_SRC_FILES := moduleName.aar >> LOCAL_MODULE_CLASS := JAVA_LIBRARIES >> LOCAL_MODULE_SUFFIX := .aar >> >> include $(BUILD_PREBUILT) >> >> If I mm in the directory it creates the intermediates correctly but does >> not copy the result to the final image /system/framework >> >> >> -- -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/d6e036d9-3d22-4861-9017-ab97d9a2f683n%40googlegroups.com.
