Home > Blockchain >  Execution failed for task ':app:mergeDebugClasses'
Execution failed for task ':app:mergeDebugClasses'

Time:03-28

Execution failed for task ':app:mergeDebugClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeClassesTask$MergeClassesWorkAction
   > Zip file 'D:\Coding\Dicoding\MenjadiAndroidDeveloperExpert\Submission\Movlix(Submission2)\app\build\intermediates\module_and_runtime_deps_classes\debug\base.jar' already contains entry 'androidx/core/R$color.class', cannot overwrite

It happened when I tried to obfuscate my project. I already tried to clean & rebuild, set multiDexEnabled to true but the project still had the same error.

Gradle Version 7.2
Gradle Plugin Version 7.1.2
Android Studio Bumblebee 2021.1.1 Patch 2

CodePudding user response:

Try to Build -> Clean Project, Build -> Rebuild Project. If it will not work, File -> Invalidate caches with default options.

If it all won't work, try to File -> Sync Project with Gradle Files.

CodePudding user response:

Solved.

I'm Downgrading my Gradle version and some adjustment dependency version solve this problem.

  • Related