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.
Similar Posts:
- Flutter: Android dependency ‘com.android.support:support-v4’ has different version …
- AndroidStudio Error: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:app:proces
- Flutter run Error: The getter ‘body1’ isn’t defined for the class ‘TextTheme’. – ‘TextTheme’ is from ‘package:flutter/src/material/text_theme.dart’
- [Solved] Flutter – AAPT: error: resource android:attr/dialogCornerRadiu…
- [Solved] Flutter – AAPT: error: resource android:attr/dialogCornerRadius not found.
- Android ERROR: This version of Android Studio cannot open this project, please retry with Android Studio 3.6 or newer.
- [Solved] Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8
- java.util.zip.ZipException: duplicate entry: com/tencent/mm/a/a.class