Well, I think there is a way to do this (although I have not tried it myself), but for users of your library you need to create your aapt manually through aapt .
The problem is this: The JAR you are exporting contains a class R file that contains the resource identifiers of your library. This way, any application can access these identifiers simply by linking your JAR. However, this is not enough, because by default only resources in the app folder / folder are associated with the APK. Therefore, you need to create the APK yourself using aapt, telling it to also include any resources from your library. For more information, see the aapt tool help.
Since this means that your library users must enter the manual build process (or at least change it), this leads to poor results.
Matthias Dec 02 '09 at 9:46 2009-12-02 09:46
source share