When i generate release build then i got this error Error:Execution failed for task \':app:transformClassesWithJarMergingForRelease\'. > com.android.build.a
Reading the comments, and having this problem myself, the problem seems to stem from a bad thirdparty lib. Perhaps using incompatible gradle or buildtool library.
Problem libs:
com.wonderkiln:camerakit:0.11.0
android.arch.persistence.room
com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer
Others have similar problems with bad libs in their /libs
folder.