12

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

4 Answers 4

10

This code will solve problem

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

or

android {
    packagingOptions {
        exclude "META-INF/DEPENDENCIES"
    }
}
Sign up to request clarification or add additional context in comments.

4 Comments

I'm getting the following error after adding this. Error: The application has specified that a custom LogFactory implementation should be used but class 'org.apache.commons.logging.impl.LogFactoryImpl' cannot be converted to 'org.apache.commons.logging.LogFactory'. Could you please help me how to resolve this?
any solution to this ?
I am having the same issue and exclude "META-INF/DEPENDENCIES" did not solve this.
@AbdusSattarNishad So far, the only thing that works for me in Android Studio 2023.3.1 (aka Jellyfish) is selecting a single module in Project Explorer, then in the Build menu, select Make Module. It is recommended to do a Clean Project first.
0

flutter clean

flutter pub get

This works for me.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
0

My ISP is using custom SSL infrastructure which blocked the Gradle downloads from: https://storage.googleapis.com/download.flutter.io/io/flutter/arm64_v8a_debug/

Once I connected to the internet with a standard connection the build completed without error.

Comments

0

the main problem in pubspec.yaml file make sure to edit pubspec.yaml correctly then flutter clean && flutter pub get

1 Comment

There is no pubspec.yaml or pubspec.yml anywhere in my filesystem. What is this file and where do I find it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.