Getting below error when build android project in android studio.
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
com.android.tools.r8.CompilationFailedException: Compilation failed to complete
com.android.tools.r8.utils.AbortException: Error: Program type already present: android.support.v4.app.NotificationBuilderWithBuilderAccessor
Solutions :
Add these line above dependencies tag in build.gradle
configurations.all {exclude group: 'com.android.support', module: 'support-v4'}