Execution failed for task ':app:transformClassesWithDesugarForDebug'

execution failed for task ':app:processdebugmanifest react-native
execution failed for task intellij
execution failed for task ':app:checkdebugduplicateclasses'.
execution failed for task ':app:processdebugresources'.
execution failed for task ':app:processdebugmanifest'. > manifest merger failed
execution failed for task ':app:processdebugmanifest'. ionic 3
execution failed for task ':app:compiledebugjavawithjavac'.
flutter execution failed for task ':app:processdebugmanifest'.

I am using ionic for my mobile application. When I am using

ionic cordova build android

getting following error :

* What went wrong:
Execution failed for task ':app:transformClassesWithDesugarForDebug'.
> com.android.build.api.transform.TransformException: java.lang.Runtime

How can I fix this build issue ? I tried :

cordova clean android

But no luck issue is still existing. Please suggest one solution to fix this issue.

Actual error :

Exception in thread "main" java.lang.IllegalArgumentException
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:108)
    at com.google.devtools.build.android.desugar.DefaultMethodClassFixer$DefaultMethodFinder.visit(DefaultMethodClassFixer.java:471)
    at org.objectweb.asm.ClassReader.accept(Unknown Source)
    at org.objectweb.asm.ClassReader.accept(Unknown Source)
    at com.google.devtools.build.android.desugar.DefaultMethodClassFixer.defaultMethodsDefined(DefaultMethodClassFixer.java:319)
    at com.google.devtools.build.android.desugar.DefaultMethodClassFixer.visitEnd(DefaultMethodClassFixer.java:88)
    at org.objectweb.asm.ClassVisitor.visitEnd(Unknown Source)
    at com.google.devtools.build.android.desugar.InterfaceDesugaring.visitEnd(InterfaceDesugaring.java:85)
    at org.objectweb.asm.ClassVisitor.visitEnd(Unknown Source)
    at com.google.devtools.build.android.desugar.LambdaDesugaring.visitEnd(LambdaDesugaring.java:150)
    at org.objectweb.asm.ClassReader.accept(Unknown Source)
    at org.objectweb.asm.ClassReader.accept(Unknown Source)
    at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:401)
    at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:326)
    at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:280)
    at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:584)

:app:transformClassesWithDesugarForDebug FAILED

build.gradle file dependencies:

dependencies {
    implementation fileTree(dir: 'libs', include: '*.jar')
    // SUB-PROJECT DEPENDENCIES START
    implementation(project(path: ":CordovaLib"))
    compile "com.android.support:support-v4:24.1.1+"
    compile "com.google.android.gms:play-services-analytics:11.0.1"
    compile "com.android.support:support-v13:26.+"
    compile "me.leolin:ShortcutBadger:1.1.17@aar"
    compile "com.google.firebase:firebase-messaging:11.6.2"
    // SUB-PROJECT DEPENDENCIES END
}

This error occurs when your dependencies classes is not defined properly so first check your google dependencies in build.gradle,All dependencies should be same version.

 compile 'com.google.android.gms:play-services-ads:11.0.4'
 compile 'com.google.firebase:firebase-core:11.0.4' 

if still got an error then open android studio and build it using SDK, in this solution if some of the your dependencies setup not correct that sdk resolve your error automatically or give you alternative to update your dependencies,I recommend to build it through SDK it will solve your problem.

Error:Execution failed for task ':app:processDebugManifest'. · Issue , Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version  Describe the bug I am just trying to start a brand new empty app, and add firebase to it. Getting this error: [ +3 ms] FAILURE: Build failed with an exception. [ +6 ms] * What went wrong: [ +3 ms] Execution failed for task ':app:signingC

Error:Execution failed for task ':app:transformClassesWithDesugarForDebug'.

com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.google.devtools.build.android.desugar.Desugar with arguments

Open your build.gradle and add this:

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
}

Then Clean-Rebuild-Run .

Execution failed for task ':app:processDebugManifest'. · Issue #1490 , FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:processDebugManifest'. > Manifest merger failed  Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more Execution failed for task ':compileJava'. > invalid source release: 1.7

this is caused by a version mismatch; most likely these are at fault:

compile "com.android.support:support-v4:24.1.1+"
compile "com.android.support:support-v13:26.+"

can build against current API level 28, with current build-tools 28.0.3:

dependencies {
    implementation "com.android.support:support-v4:28.0.0"
    implementation "com.android.support:support-v13:28.0.0"
    implementation "com.google.android.gms:play-services-analytics:16.0.6"
    implementation "com.google.firebase:firebase-messaging:17.3.4"
    implementation "me.leolin:ShortcutBadger:1.1.17"
}

Solved: Error:Execution failed for task ':app:processDebugManifest , Copied code in the video is uploaded on google drive: https://drive.google.com/​open?id=1U Duration: 6:32 Posted: Jun 15, 2018 The system cannot find the path specified. The system cannot find the path specified. [√] Flutter (Channel stable, v1.12.13+hotfix.5, on Windows, locale en-US) • Flutter version 1.12.13+hotfix.5 at C:\src\flutter • Framework revision 27321ebbad (7 weeks ago), 2019-12-10 18:15:01 -0800 • Engine revision 2994f7e1e6 • Dart version 2.7.0 [√] Android toolchain - develop for Android

Execution failed for task ':processDebugManifest' stackoverflow , uses-sdk android:minSdkVersion="14" android:targetSdkVersion="16" minSdkVersion 14 Duration: 1:41 Posted: Oct 13, 2017 My project is a brand new one, but having problems running the app on my device without getting an error: Execution failed for task ':app:mergeDexDebug'. My app is using AndroidX. I've added my google-services.json file, followed the steps etc.

Execution failed for task ':linkDebugExecutableMingw', I just create project with Kotlin/Native, change package name and build. But project not builded with this error: Execution failed for task  Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more Gradle: Execution failed for task ':processDebugManifest'

Execution failed for task ':bundleReleaseResources'., I'm getting this error right now: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':bundleReleaseResources'. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':decompileMc'. > Process 'command 'C:\Program Files (x86)\Java\jre1.8.0_66\bin\java.exe'' finis. hed with non-zero exit value 1 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug. option to get more log output. BUILD FAILED

Comments
  • Many possible solutions: stackoverflow.com/questions/45833937/…
  • @JakeSteam i tried all these solutions but its not working
  • Can you try posting the rest of your error please, specifically the actual stack trace that usually appears just before the "what went wrong"?
  • @JakeSteam updated error what i am getting on my end
  • Can you show your app level build.gradle? This issue looks very similar.
  • Which build.gradle ?. I tried In app build.gradle but its not working
  • Sorry for the late reply,now try to build your project in android studio if it's a version mismatch problem then android sdk gives you an error with option to update gradle then update it ,it will solve your issue.
  • Still same issue