In my opinion, this is mainly used for the library module.
If one library module depends on somelib.jar , another application module, which depends on the library module, also depends on somelib.jar , then errors with several dex files may appear.
According to Tips, the problem can be solved by creating a simple module that cannot publish *.jar or *.aar and only for use by other modules , with only *.jar s dependency. In this case, the output of the *.aar library module will not contain somelib.jar .
source share