java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Please follow the Android official guide for setting up multidex support, which is located here: https://developer.android.com/studio/build/multidex.html
Remember to always sync the project whenever any gradle files change:
Install Build Tool and sync project.
Make sure that you are always up-to-date with respect to Android SDK updates:
Go to the top toolbar in Android Studio and click Tools > Android > Enable ADB integration.