After adding the firebase sdk to gradle facing the below issue.
Error:Execution failed for task \':app:transformClassesWithJarMergingForDebug\'.
Just execute command - ./gradlew :app:dependencies and then see if the libs you are using internally using any other versions of google play service .If yes then remove or update those libs.
./gradlew :app:dependencies