DexArchiveMergerException: Unable to merge dex - Android Studio 3.0 Stable
Add
implementation('commons-validator:commons-validator:1.4.1') {
exclude group: 'commons-collections', module: 'commons-collections'
}
instead of
implementation'commons-validator:commons-validator:1.4.1'
The reason I've tried to explain here if you want to understand the issue and solution.
Hope it solves your issue.