Xunter Monst
Xunter Monst

Reputation: 71

Execution failed for task ':app:desugarDebugFileDependencies'

I'm attempting to run a Flutter application, but keep getting this output in the console:

Launching lib/main.dart on Android SDK built for x86 in debug mode...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:desugarDebugFileDependencies'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > /home/(username)/Android/Sdk/build-tools/28.0.3/core-lambda-stubs.jar

* 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

BUILD FAILED in 41s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

Upvotes: 7

Views: 13441

Answers (4)

Bhupendra Dangi
Bhupendra Dangi

Reputation: 71

For React Native 0.63.2 I just run the following commands from the root directory

cd android && gradlew clean (for windows) or ./gradlew clean (for other)

Upvotes: 2

Urmil Shroff
Urmil Shroff

Reputation: 507

Deleting the /build-tools/28.0.3 folder and rerunning the app worked for me!

Upvotes: 3

Victor Ortiz
Victor Ortiz

Reputation: 910

I'm using linux mint,in my case I went to: /home/(username)/Android/Sdk/build-tools/ and delete the folder "28.0.3". Then run the application and android studio reinstall this folder, and the application works correctly without the error mentioned.

Upvotes: 10

Kelly Campbell
Kelly Campbell

Reputation: 51

I found that my build-tools/28.0.3/ directory was missing many files, probably from a failed install. I used the SDK manager in android studio to remove 28.0.3 and then reinstalled it and the files are there now.

Upvotes: 4

Related Questions