corwin42's
AHQuickAction library contains a very useful class named
RHelper which makes it easy to get resources from the dynamically compiled R class.
That is as long as your library user has added read-only resources to their project.
I copied and used it for the first time just earlier today and it works perfectly (just testing a library on my computer) so i made a note to contact corwin42 to ask if it's allowed to copy that class for my own use.
I have some other code that i was gonna ask corwin42 about so haven't got in touch with him yet but that looks like the best and most reliable way to access the R class from a library...
Who shall ask permission first you or i?
Martin.