'After migration of this old project I'm getting this error and I have tried a lot of ways

FAILURE: Build failed with an exception.
  • What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.google.android.exoplayer2.ui.DownloadNotificationHelper found in modules jetified-exoplayer-core-2.17.0-runtime (com.google.android.exoplayer:exoplayer-core:2.17.0) and jetified-exoplayer-ui-2.15.1-runtime (com.google.android.exoplayer:exoplayer-ui:2.15.1)

 Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2m 52s Exception: Gradle task assembleDebug failed with exit code 1

The old project after migration shows this.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source