1. When packaging, place the resource in the asset folder and get the specified resource through Assetsmanager:
The assets folder in the target app and Jar is merged, so you can get the target resource by getting the folder for that app
2. Using the Library project
Such a method cannot confuse the code, which means that the library source project needs to be provided at the time of publication. In the target project referencing this lib, you will see a jar file that contains the compiled Class.dex, which is still only part of the code after it is decompile.
3. Using the Dual Library project
Provides a way for a double-decker library project to confuse code, but XML and picture resources are still exposed, and need to provide a two-level reference project when publishing, the operational complexity is higher than directly provide the jar package and resources
4. Direct provision of jar packages and resources (separate)
Still a reflection R file, resources will be exposed to the developer.
About the Android Project export jar with res resource file summary