Android componentized Development (Note) and android Components
1. Merge Manifest
When compiling a project in Android studio, no matter how many modules you use, all Manifest will be merged into one. Note that the values referenced by these attributes under the application tag are used.
If multiple modules have resources with the same name, the Manifest merging fails because they do not know which resource to reference during compilation.
Solution: Add a red flag to the main Module Manifest application. The principle is to use the resource referenced by the current Manifest.
<Application
Android: icon = "@ mipmap/appicon"
Android: label = "@ string/app_name"
Android: theme = "@ style/AppTheme"
Tools: replace = "icon, label, theme">
</Application>
2. configuration in the sub-Module build file. The main Module build file must have
3. The package names of any Module cannot be the same