Cant build my App with cordova build (Failure)

Hi,

i tried to compile my Project but it failed.
I compiled this Project yesterday with no problems and i just installed one new Cordova Plugin and now it doesn’t work anymore.

My Error:

tNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:compileDebugJavaWithJavac
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:createDebugCompatibleScreenManifests
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:app:compileDebugJavaWithJavac
:app:compileDebugNdk NO-SOURCE
:app:compileDebugSources
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:transformClassesWithStackFramesFixerForDebug
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

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDesugarForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: 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 {--input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/21.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/23.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/19.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/21.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/1.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/3.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/4.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/6.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/20.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/22.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/3.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/5.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/13.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/15.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/16.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/CordovaLib/build/intermediates/intermediate-jars/debug/classes.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/classes/debug --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/1.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/3.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/4.jar--classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/6.jar --classpath_entry/Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/7.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/8.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/9.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/10.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/11.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/12.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/13.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/15.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/16.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/17.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/18.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/19.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/20.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/21.jar --bootclasspath_entry /Users/jstrauss/Library/Android/sdk/platforms/android-27/android.jar --bootclasspath_entry /Users/jstrauss/Library/Android/sdk/platforms/android-27/optional/org.apache.http.legacy.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/resources.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/rt.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jsse.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jce.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/charsets.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jfr.jar --min_sdk_version 19 --nodesugar_try_with_resources_if_needed --desugar_try_with_resources_omit_runtime_classes}

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 15s
35 actionable tasks: 35 executed
/Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
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)


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDesugarForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: 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 {--input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/21.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/23.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/19.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/21.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/1.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/3.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/4.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/6.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/20.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/22.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/3.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/5.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/13.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/15.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/16.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/CordovaLib/build/intermediates/intermediate-jars/debug/classes.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/classes/debug --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/1.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/3.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/4.jar--classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/6.jar --classpath_entry/Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/7.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/8.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/9.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/10.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/11.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/12.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/13.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/15.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/16.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/17.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/18.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/19.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/20.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/21.jar --bootclasspath_entry /Users/jstrauss/Library/Android/sdk/platforms/android-27/android.jar --bootclasspath_entry /Users/jstrauss/Library/Android/sdk/platforms/android-27/optional/org.apache.http.legacy.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/resources.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/rt.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jsse.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jce.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/charsets.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jfr.jar --min_sdk_version 19 --nodesugar_try_with_resources_if_needed --desugar_try_with_resources_omit_runtime_classes}

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 15s
[ERROR] An error occurred while running subprocess cordova.

        cordova build android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

I hope anyone can help me.

Thanks

try following command:

ionic cordova prepare
this will install the latest plugins and for platforms too.
try with it.

Thanks for the answer but it doesn’t work either. The output of this Command is:

https://hastebin.com/yazeyihoha.makefile

Look Here

Thanks but doesn’t help same error as before :frowning:

Getting this error while giving build for android, please help me

D:\Toufiq\Tineri-v3_Staging>cordova build android
Android Studio project detected
Preparing Firebase on Android
ANDROID_HOME=C:\Users\midhun\AppData\Local\Android\Sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_162
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now
published.
Configuration ‘compile’ in project ‘:app’ is deprecated. Use ‘implementation’ instead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_2fip9ibjr1csxugdb159f8sbc.run(D:\Toufiq\Tineri-v3_Staging\platforms\android\app\build.gradle:148)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugRenderscript
:CordovaLib:checkDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:platformAttrExtractor
:CordovaLib:processDebugManifest
:CordovaLib:javaPreCompileDebug
:CordovaLib:processDebugJavaRes NO-SOURCE
:app:cdvCreateAssetManifest UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild
:app:compileDebugAidl
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript
:app:checkDebugManifest
:app:generateDebugBuildConfig
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:createDebugCompatibleScreenManifests
:app:processDebugManifest
D:\Toufiq\Tineri-v3_Staging\platforms\android\app\src\main\AndroidManifest.xml:24:9-31:50 Warning:
activity#com.google.firebase.auth.internal.FederatedSignInActivity@android:launchMode was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present
:app:splitsDiscoveryTaskDebug
:app:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:extractTryWithResourcesSupportJarDebug
:CordovaLib:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNativeLibsWithMergeJniLibsForDebug
:CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug
:app:mergeDebugJniLibFolders
:app:processDebugJavaRes NO-SOURCE
:app:validateSigningDebug
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

:app:compileDebugSources
:app:transformClassesWithStackFramesFixerForDebug
:app:transformClassesWithDesugarForDebugException in thread “main” java.lang.NoClassDefFoundError: org/gradle/api/DefaultTask
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
at com.google.devtools.build.android.desugar.HeaderClassLoader.findClass(HeaderClassLoader.java:66)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.google.devtools.build.android.desugar.LambdaDesugaring.loadFromInternal(LambdaDesugaring.java:330)
at com.google.devtools.build.android.desugar.LambdaDesugaring.access$500(LambdaDesugaring.java:53)
at com.google.devtools.build.android.desugar.LambdaDesugaring$InvokedynamicRewriter.createLookup(LambdaDesugaring.java:559)
at com.google.devtools.build.android.desugar.LambdaDesugaring$InvokedynamicRewriter.visitInvokeDynamicInsn(LambdaDesugaring.java:395)
at org.objectweb.asm.MethodVisitor.visitInvokeDynamicInsn(Unknown Source)
at org.objectweb.asm.MethodVisitor.visitInvokeDynamicInsn(Unknown Source)
at org.objectweb.asm.ClassReader.a(Unknown Source)
at org.objectweb.asm.ClassReader.b(Unknown Source)
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)
Caused by: java.lang.ClassNotFoundException: Class org.gradle.api.DefaultTask not found
at com.google.devtools.build.android.desugar.HeaderClassLoader.findClass(HeaderClassLoader.java:53)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 20 more

FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:transformClassesWithDesugarForDebug’.

com.android.build.api.transform.TransformException: java.lang.RuntimeException: 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 {@D:\Toufiq\Tineri-v3_Staging\platforms\android\app\build\intermediates\tmp\desugar_args3537853445767531081}

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug42 actionable tasks: 39 executed, 3 up-to-date
    option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 48s
(node:5308) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Exception in thread “main” java.lang.NoClassDefFoundError: org/gradle/api/DefaultTask
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
at com.google.devtools.build.android.desugar.HeaderClassLoader.findClass(HeaderClassLoader.java:66)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.google.devtools.build.android.desugar.LambdaDesugaring.loadFromInternal(LambdaDesugaring.java:330)
at com.google.devtools.build.android.desugar.LambdaDesugaring.access$500(LambdaDesugaring.java:53)
at com.google.devtools.build.android.desugar.LambdaDesugaring$InvokedynamicRewriter.createLookup(LambdaDesugaring.java:559)
at com.google.devtools.build.android.desugar.LambdaDesugaring$InvokedynamicRewriter.visitInvokeDynamicInsn(LambdaDesugaring.java:395)
at org.objectweb.asm.MethodVisitor.visitInvokeDynamicInsn(Unknown Source)
at org.objectweb.asm.MethodVisitor.visitInvokeDynamicInsn(Unknown Source)
at org.objectweb.asm.ClassReader.a(Unknown Source)
at org.objectweb.asm.ClassReader.b(Unknown Source)
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)
Caused by: java.lang.ClassNotFoundException: Class org.gradle.api.DefaultTask not found
at com.google.devtools.build.android.desugar.HeaderClassLoader.findClass(HeaderClassLoader.java:53)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 20 more

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:transformClassesWithDesugarForDebug’.

com.android.build.api.transform.TransformException: java.lang.RuntimeException: 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 {@D:\Toufiq\Tineri-v3_Staging\platforms\android\app\build\intermediates\tmp\desugar_args3537853445767531081}

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug
    option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 48s
(node:5308) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Hi Toufiq? Did you find a solution? I’m stuck with the same issue

hi afelipelli,
please follow the below steps for me the issue is resolved by following this steps

1)ionic cordova platform rm android

2)ionic cordova plugin rm cordova-plugin-firebase

3)cordova plugin add https://github.com/dpa99c/cordova-plugin-firebase#GH-1057-April-05-android-build-issue

4)cordova plugin add cordova-android-support-gradle-release

5)ionic cordova platform add android@7.0.0

6)com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true //Add this line at last in platform/android/app/build.gradle

  1. change the following in project.properties
    cordova.system.library.4=com.google.android.gms:play-services-tagmanager:16.0.8
    cordova.system.library.5=com.google.firebase:firebase-core:16.0.8
    cordova.system.library.6=com.google.firebase:firebase-messaging:17.5.0
    cordova.system.library.7=com.google.firebase:firebase-config:16.4.1
    cordova.system.library.8=com.google.firebase:firebase-pref:16.2.4
    cordova.system.library.9=com.google.android.gms:play-services-analytics:16.0.8

hope this will help you.

Thanks, Toufiq23!

I followed those steps and now I’m getting a different error. Not sure if it’s related but thought I’d put here in case you have any ideas:

Failed to execute aapt

com.android.ide.common.process.ProcessException: Failed to execute aapt

at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796)

at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551)

After serveral tests, my solution was change cordova-plugin-firebase by cordova-plugin-firebasex.

rm -Rf platforms/android
cordova plugin rm cordova-plugin-firebase
rm -Rf plugins/ node_modules/
npm install
cordova plugin add cordova-plugin-firebasex
cordova platform add android

and use

<engine name="android" spec="^8.0.0" /> 

in my config.xml

I hope this helps.

Thank you so much!
For some reason, your exact steps didn’t work for me. But a similar set of steps did. Posting here in case it helps someone else:

rm -Rf platforms/android
cordova plugin rm cordova-plugin-firebase
npm i cordova-plugin-firebasex
cordova platform add android
ionic cordova build android