When I run the app error is coming as Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'

When I run the app below mentioned error is coming. Can any body please help on solving my issue.

I will be very thankful.

Task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug' is not up-to-date because:
  Task has failed previously.
All input files are considered out-of-date for incremental task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
Merging to 'E:\Android\MyProjects\MySaloons\app\build\intermediates\transforms\externalLibsDexMerger\debug\0' with D8 from 
AGPBI: {"kind":"error","text":"Program type already present: android.arch.core.util.Function","sources":[{}],"tool":"D8"}
:app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
:app:transformDexArchiveWithExternalLibsDexMergerForDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 1.446 secs.
:app:buildInfoGeneratorDebug (Thread[Daemon worker Thread 2,5,main]) started.
:app:buildInfoGeneratorDebug
Task ':app:buildInfoGeneratorDebug' is not up-to-date because:
  Task has not declared any outputs.
:app:buildInfoGeneratorDebug (Thread[Daemon worker Thread 2,5,main]) completed. Took 0.013 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: 
  Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
  Program type already present: android.arch.core.util.Function

* Try:
Run with --debug option to get more log output. Run with --scan to get full insights.

* Exception is:

Caused by: com.android.tools.r8.utils.AbortException: Error: Program type already present: android.arch.core.util.Function
    at com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:116)
    at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:74)
    at