Duplicate jar entry Error in Release mode [Android]

I am working with 2 libraries in my app. The app compiles and runs well in debug mode. However when ran in release mode the build fails with the error ‘Duplicate jar entry [com...***.classs]’.

Looking for inputs on how to approach this error.

Your help will be greatly appreciated. Thanks.