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

后端 未结 6 1977
刺人心
刺人心 2020-11-28 14:28

I have migrated my project from Android Studio 2.3.3 to Android Studio 3.0 Beta 2 and now my project won\'t run.

I get the following message in the console:

相关标签:
6条回答
  • 2020-11-28 14:43

    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

    0 讨论(0)
  • 2020-11-28 14:44

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

    0 讨论(0)
  • 2020-11-28 14:57

    In my case, all compileSdkVersion, buildToolsVersion and targetSdkVersion must be the same version, especially compileSdkVersion. Because if you don't define compileSdkVersion, the last version import automatically, so be careful.

    0 讨论(0)
  • 2020-11-28 15:07

    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 .

    0 讨论(0)
  • 2020-11-28 15:07

    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

    0 讨论(0)
  • 2020-11-28 15:09

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

    0 讨论(0)
提交回复
热议问题