Grade compiled Android solution error:more than one library with package name
Errorwith‘com.app.XX‘errorwith android.enforceUniquePackageName=falseisandin1.0
Recently, the old project was built as a gradle compilation, and the general directory format was:
A main project, dependent on four sub-projects, intermediate conversion, there are a lot of problems, finally one by one solved.
| Main Project |
Sub-project |
Dependent |
| Mainpro |
|
|
|
–>ext1 |
–>ext2 |
|
–>ext2 |
|
|
–>ext3 |
–> ETT2 |
|
–>ext4 |
|
When the project is compiled, it always appears
package‘com.app.XX‘
Found some programs on the Internet, but still do not, and finally analyzed the following: More than one library with the package name ' Com.app.XX ', from the meaning can be understood that the library has two dependencies of the name is the same, the last thin row Check it out, sure enough. There are two package names that are the same ext2 and EXT4 package names are:
com.app.XX
It turns out to be the reason for this. The package name of the ext2 that re-publishes the Dependent project is:
com.app.aXX
OK, but since Ext 3 relies on ext2, EXT1 also relies on ext 2, so it means re-releasing EXT1 and ext3 as well.
But this is obviously troublesome, in fact, depending on the time, can be written
‘com.xxx.sdk:xxx-lib:1.0.+‘
After the change to 1.0.+, when there is the latest, will be the first choice of the latest.
After this release, if ext2 still have a problem, or modify the bug, Ext1 and ext3 will automatically get the latest, there is no need to republish.
Grade compiled Android solution error:more than one library with package name