【问题标题】:I cloned a flutter project from github but I am unable to run it我从 github 克隆了一个颤振项目,但我无法运行它
【发布时间】: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

标签: android flutter gradle


【解决方案1】:

您应该尝试 flutter cleanflutter run

如果这对您不起作用,请创建一个新项目并复制粘贴代码和类,而不是完整的项目

【讨论】:

    猜你喜欢
    • 2021-11-16
    • 2019-01-09
    • 2019-09-09
    • 2021-03-01
    • 2021-10-12
    • 2021-11-29
    • 1970-01-01
    • 2020-03-12
    • 1970-01-01
    相关资源
    最近更新 更多