Execution failed for task app:transformClassesWithDesugarForDebug error on Android Studio 3.0 Beta 2

I faced with this issue in an ionic cordova project

the solution was a clean of the project :

cordova clean android

i hope it will be helpful


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 use below

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"

Then Clean-Rebuild-Run .


change your porject/build.gralde

compileOptions {
    //sourceCompatibility JavaVersion.VERSION_1_8
    //targetCompatibility JavaVersion.VERSION_1_8
}

rebuild .......ok, I change this file. rebuild ......Compile apk successfully! Hope it helps you


I just fixed it by removing the "build/intermediates" directory.


In my case, I changed source compatibility and target compatibility from 1.8 to 1.7, and everything started to work