Execution failed for task ':app:desugarDebugFi

2020-07-11 04:26发布

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)

3条回答
霸刀☆藐视天下
2楼-- · 2020-07-11 04:35

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

查看更多
Bombasti
3楼-- · 2020-07-11 04:39

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.

查看更多
够拽才男人
4楼-- · 2020-07-11 04:52

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.

查看更多
登录 后发表回答