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
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.
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.
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.
This code will solve problem
android {
packagingOptions {
pickFirst "META-INF/DEPENDENCIES"
}}
or
android {
packagingOptions {
exclude "META-INF/DEPENDENCIES"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With