Execution failed for task ':app:checkDebugDuplicateClasses' while working with opencv - android

I'm working on a document scanner app, first I added this plugin and everything worked fine until I decided to add some filters with OpenCV. I installed this other plugin plugin to handle the image filter but when I tried to run the app I get the next error:
`FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class org.opencv.BuildConfig found in modules jetified-opencv-4.1.0-runtime (com.quickbirdstudios:opencv:4.1.0) and jetified-opencv-4.1.0-runtime (com.websitebeaver:opencv:4.1.0)
`
The error output list a lot of other duplicated classes all OpenCV related, I saw some similar post but the problem there is just the version of a dependency but here looks like something else and I just can figure out how to solve this.
I tried the suggestions from these posts but nothing same to solve the problem here and here
thanks in advance

Related

KtLint Execution failed for task ':app:ktlintAndroidTestDebugSourceSetCheck'

I am using gradle version 7.0.0-beta01 and following this guide to setup KtLint to my project. But I am facing error while running following command
./gradlew ktlintFormat
Running with -stacktrace etc also doesn't seem to help much. Here is the error I am getting. Any help is much appreciated.
Execution failed for task ':app:ktlintAndroidTestDebugSourceSetFormat'.
> Querying the mapped value of task ':app:ktlintAndroidTestDebugSourceSetFormat' property 'reporterOutputDir' before task ':app:ktlintAndroidTestDebugSourceSetFormat' has completed is not supported
This was fixed in a later version of the ktlint gradle plugin. You can go down to 9.2.1 or up to 10.0.0. See this issue.

How to fix this build issue in android?

i keep getting this build error, i cant get the generated binding object correctly in the Kotlin code
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: The processing instruction target matching "[xX][mM][lL]" is not allowed.
i've tried to invalidate, restart, clean the project but it didn't pay off
if the clean and rebuild doesn't work.I think that downgrading your gradle version to 1.2.3.I hope it helps.

Gradle error: Execution failed for task ':crashlyticsGenerateSymbolsArmRelease'. > Crashlytics Developer Tools error

I had setup crashlytics to get ndk crashes for my Android app. Crashes are getting recorded in crashlytics but I am not getting the line numbers.
Went through: https://support.crashlytics.com/knowledgebase/articles/605190-missing-line-numbers-in-native-crashes
I am getting the following error on running below command:
./gradlew crashlyticsUploadSymbolsArmRelease
What went wrong:
Execution failed for task ':crashlyticsGenerateSymbolsArmRelease'.
Crashlytics Developer Tools error.
I have tried various solutions but nothing is helping.
In case you are still looking: I had the same problem and found the correct command in the Gradle view:
app->Tasks->other->crashlyticsUploadSymbolsMYAPPVARIANTNAME
You can search the gradle tasks in the gradle window as well by just starting to type:

Execution failed for task ':app:processDebugManifest' in Gradle

Receiving following errors
in Android Studio 2.2
Cannot resolve symbol R in Android Studio 2.2
in gradle console
Execution failed for task ':app:processDebugManifest'.
Manifest merger failed with multiple errors, see logs
Any help would be appreciated.
clean your build, and retry? Sometimes I noticed when I switch branches a lot my R.java file is outdated and doesn't get rebuilt correctly or references out of date xml id's.
Just rebuild project and it will be okay, I also have faced alot of times this error

Execution failed for task ':app:mockableAndroidJar'

I am using local gradle of version 2.4 and IntelliJ IDEA 14.1.3
When I run project from IntelliJ it runs fine but when execute gradle clean build command from command line it gives the flowing exception and build fails.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mockableAndroidJar'.
> java.util.zip.ZipException: invalid entry compressed size (expected 2051 but got 2050 bytes)
This looks like an old ques which is not yet answered yet.
I got into same problem, when my jar files could not be read by Android Studio and it gave me the above mentioned error.
Taking lead from the comment by -Mikhail Boyarsky I changed classpath in build.gradle file to 'com.android.tools.build:gradle:2.2.3'.
Synced project and it started working.
I solved it by changing com.android.tools.build:gradle:2.3.0 version to 2.2.3, then build it with another exception and then I changed the version back to 2.3.0.
Not sure how it works, looks like a gradle bug.

Categories

Resources