When I try to add two desgaring api in proejct I am gettig gradle error in android ,

   coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
    coreLibraryDesugaring("com.android.tools:desugar_jdk_libs_nio:2.0.2")

I also enabe desugaring in compile option but still getting errror.

I searched all over internet fro this but found nothing regarding this,

here is stacktrace

What went wrong:
A build operation failed.
    Could not resolve all files for configuration ':app:detachedConfiguration4'.
Could not resolve all files for configuration ':app:detachedConfiguration4'.
Failed to transform FakeDependency.jar to match attributes {artifactType=_internal-d8-desugar-methods, enable-core-library-desugaring=true, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
Execution failed for D8BackportedMethodsGenerator: /home/shubham/.gradle/android/FakeDependency.jar.
Cannot invoke "com.android.tools.r8.internal.X30.a(com.android.tools.r8.DiagnosticsLevel, com.android.tools.r8.Diagnostic)" because "<parameter3>" is null

* Try:
> 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.

* Exception is:
com.intellij.openapi.externalSystem.model.ExternalSystemException: A build operation failed.
    Could not resolve all files for configuration ':app:detachedConfiguration4'.
0

There are 0 best solutions below