Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Execution failed for task ':app:mergeDebugJavaResource'

I build new Project in android studio Java language and Run 'app' failed show error.

I installed New program and installed new windows but Run failed show error.

Executing tasks: [:app:assembleDebug] in project D:\File\Android Project\MyApplication

> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:mainApkListPersistenceDebug UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugResources UP-TO-DATE
> Task :app:compileDebugJavaWithJavac UP-TO-DATE
> Task :app:compileDebugSources UP-TO-DATE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders UP-TO-DATE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:dexBuilderDebug
> Task :app:mergeDebugJavaResource FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > com.google.common.base.VerifyException (no error message)

* 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 6s
15 actionable tasks: 2 executed, 13 up-to-date
like image 450
Jel Oly Avatar asked Mar 14 '20 16:03

Jel Oly


People also ask

How to fix app mergedebugresources in Android Studio?

How to fix app:mergeDebugResources in Android Studio (Resource path could not resolved / R.id is not accessible) Go to the project folder from file explorer. Delete(before delete Backup all files) .idea folder. If there are any .gradle folder do the 2nd step to the .gradle folder too.

How to fix Gradle not synchronizing with Java_home error?

then sync the Gradle file and rebuild! Sometimes, it might be the slightest error in your $JAVA_HOME configuration which is tabbing this error, just fix it like this: Double-check the build of your app. gradle. It adds an extra.jar file as a dependency that didn’t exist in your project.

Why is my Gradle app crashing when I run it?

Sometimes, it might be the slightest error in your $JAVA_HOME configuration which is tabbing this error, just fix it like this: Double-check the build of your app. gradle.


1 Answers

This code will solve problem

android {
packagingOptions {
    pickFirst "META-INF/DEPENDENCIES"
    
}}

or

android {
        packagingOptions {
           
            exclude "META-INF/DEPENDENCIES"
        }
    }
like image 193
Nibuvax Avatar answered Oct 12 '22 22:10

Nibuvax