FLUTTER Project Error : FAILURE: Build failed with an exception

FLUTTER Project Error : FAILURE: Build failed with an exception

我有一个 Mac,当我 运行 在 iPhone 上使用 VSCode Flutter 应用程序时它可以工作,但是如果我 运行 相同的应用程序在 Android phone 然后抛出错误

已经提问但没有答案:

Execution failed for task ':app:desugarDebugFileDependencies'

Visual Studio 错误:

https://prnt.sc/qrlvt1

Android 工作室错误:

https://prnt.sc/qrlw6r

https://prnt.sc/qrlway

https://prnt.sc/qrlwfk

https://prnt.sc/qrlwkc

https://prnt.sc/qrlwpm

使用Android SDK管理器卸载构建工具28,然后重新安装。这对我有用。

构建工具列在 'SDK Tools' 选项卡下,您必须取消选中 'Hide obsolete packages' 并选中 'Show package details' 以显示版本 28 的构建工具。

https://prnt.sc/qrnv1b