Tag Archives: # Android bug

Execution failed for task ‘:app:checkDebugDuplicateClasses‘.

Problem
Android Studio compiles with the following error.
Execution failed for task ':app:checkDebugDuplicateClasses'.


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class com.tencent.ijk.media.exo.BuildConfig found in modules jetified-LiteAVSDK_Player-7.5.9307-runtime.jar (com.tencent.liteav:LiteAVSDK_Player:7.5.9307) and jetified-LiteAVSDK_Player_7.5.9307-runtime.jar (:LiteAVSDK_Player_7.5.9307:)
  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 1m 34s
155 actionable tasks: 155 executed

reason

Relying on duplicate resource files, for example:

The a.aar file is imported into lib , and then the same a file is relied on in build. Gradle . It depends on two different resource files, but they contain the same content.

Solution

Remove the duplicate resource files.