'Cordova build Execution failed for task ':app:compileDebugJavaWithJavac'

I am building mobile app using cordova https://cordova.apache.org/ I am facing error when I am trying to build for android platform even after updating build.gradle .below I have shown the error.

cordova --version 10.0.0

Android Debug Bridge version 1.0.41

Version 31.0.2-7242960

> Task :app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
   > Failed to transform isoparser-1.1.17.jar to match attributes {artifactType=android-classes-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: C:\voicegab\platforms\android\app\libs\isoparser-1.1.17.jar.
         > Failed to transform 'C:\voicegab\platforms\android\app\libs\isoparser-1.1.17.jar' using Jetifier. Reason: ZipException, message: invalid distance too far back. (Run with --stacktrace for more details.)
           Please file a bug at http://issuetracker.google.com/issues/new?component=460323.

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 3s
21 actionable tasks: 1 executed, 20 up-to-date
Command failed with exit code 1: C:\voicegab\platforms\android\gradlew cdvBuildDebug -b C:\voicegab\platforms\android\build.gradle

I have updated my gradle build file inside platform/android/build.gradle

buildscript {
    ext.kotlin_version = '1.3.50'
    apply from: 'repositories.gradle'
    repositories {
    maven { url "https://maven.google.com" }
    jcenter { url "http://jcenter.bintray.com/"}
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    apply from: 'repositories.gradle'
    repositories {
    maven { url "https://maven.google.com" }
    jcenter { url "http://jcenter.bintray.com/"}
    }

    //This replaces project.properties w.r.t. build settings
    project.ext {
      defaultBuildToolsVersion="29.0.2" //String
      defaultMinSdkVersion=22 //Integer - Minimum requirement is Android 5.1
      defaultTargetSdkVersion=29 //Integer - We ALWAYS target the latest by default
      defaultCompileSdkVersion=29 //Integer - We ALWAYS compile with the latest by default
    }
}



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source