1.AAR Packaging Coverage
The main module (APK) overwrites the same name resource in AAR:
The policy is as follows:
Resource file examples, layout is the use of the cover method. The values file, such as Strings.xml, is in merge mode.
Dependent modules can only be packaged using AAR, such as a two-party library such as a UI library.It is recommended to put all the common resource resources in the common module, and establish the corresponding naming mechanism to prevent duplication.
In the future, if there is a business-independent module can be played as a bundle,bundle can be seen as a standalone apk, with a separate resource file
2. MAVEN supports specifying the RES directory at compile time (similar to Android overlay). Specific as follows:
<artifactId>android-maven-plugin</artifactId> <configuration>+ < resourceoverlaydirectories>+ <dir>res-overlay</dir>+ </resourceoverlaydirectories >
Add the Resourceoverlaytdirectioies node to the configuration node of the Android Maven-plugin, and set the overlay directory.
When packaged, Res-overlay replaces the resource file with the same name under Res.
Can be used to change skin, replace different versions of resource files.
Reference:
Https://code.google.com/p/maven-android-plugin/wiki/ApkSourcesDependency
Https://code.google.com/p/maven-android-plugin/wiki/Changelog
Android Overlay:
http://my.oschina.net/kingguary/blog/160190
Android MAVEN Package Bulk Replace resource file (overlay skin) &aar Packaging Dependency Module overlay policy