【问题标题】:ERROR When Running Flutter App in Android Studio: Execution failed for task ':app:generateDebugBuildConfig'在 Android Studio 中运行 Flutter App 时出现错误:任务 ':app:generateDebugBuildConfig' 执行失败
【发布时间】:2020-11-12 07:00:25
【问题描述】:

我是移动应用开发的新手,但我想构建一个非常简单的应用。我在网上搜索,发现 Flutter 是最吸引人的选择。我找到了一些视频,向您展示了如何使用 Android Studio 设置 Flutter。我跟着视频,一切都很好,直到我在模拟器上运行 Flutter 模板时遇到问题。我收到了这个错误:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:generateDebugBuildConfig'.
> java.nio.file.AccessDeniedException: C:\Users\ivomu\Desktop\New folder\PROGRAMIRANJE\Flutter Apps\WeightAppp\build\app\generated\source\buildConfig\debug\com\example\WeightAppp

* 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 3s
Exception: Gradle task assembleDebug failed with exit code 1

我在网上查了一下,没有发现其他人有这样的问题。我该如何解决这个问题?

【问题讨论】:

    标签: android flutter mobile


    【解决方案1】:
    java.nio.file.AccessDeniedException
    

    Flutter 可能没有访问特定文件的权限。

    如果您使用的是命令提示符,请尝试以管理员权限运行它。如果您使用的是 Android Studio,请尝试以管理员身份打开 Android Studio。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-13
      • 2015-05-16
      • 2022-01-06
      • 1970-01-01
      • 2016-02-09
      • 2018-04-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多