【发布时间】:2021-02-10 14:48:51
【问题描述】:
我从 Github 克隆了一个 Flutter 项目(项目链接:https://github.com/abuanwar072/Covid-19-Flutter-UI.git),我没有更改代码中的任何内容。我已经在 VS Code 中克隆了它,但是当我尝试在我的 android 模拟器上运行它时,我遇到了一个错误。
日志:
[38;5;248mLaunching lib\main.dart on Android SDK built for x86 in debug mode...[39;49m
lib\main.dart
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':app:processDebugResources'.
> File 'C:\Users\RIJAK\AppData\Local\Android\sdk\platforms\android-28\android.jar' specified for property 'androidJar' does not exist.
* 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 13s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
我已经尝试从 android studio 更新我的 android SDK 并运行颤振医生(它显示了一些关于许可证的内容,所以我通过对它显示给我的所有许可证说是来修复它)。它仍在产生上述消息。我不确定我是否正确执行了 SDK 更新部分,但请帮助理解如何正确执行。
【问题讨论】:
-
你试过 pub get 在终端吗?
-
是的,我试过了,但还是不行。
-
你安装了哪个版本的Android SDK?
-
也许运行
flutter clean,然后再次尝试flutter run。