android - 在 Android Studio 中运行 Flutter App 时出现错误:任务 ':app:generateDebugBuildConfig' 执行失败
问题描述
我是移动应用程序开发的新手,但我想构建一个非常简单的应用程序。我在网上搜索,发现 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
我在网上查了一下,没有其他人有这样的问题。我该如何解决?
解决方案
java.nio.file.AccessDeniedException
Flutter 可能没有访问特定文件的权限。
如果您使用的是命令提示符,请尝试以管理员权限运行它。如果您使用的是 Android Studio,请尝试以管理员身份打开 Android Studio。
推荐阅读
- python - 关于python的几个问题
- python-xarray - 带有 GroupBy 的 xarray.apply_ufunc():意外的维数
- html - 在菜单上创建悬停效果
- excel - Excel中的条件函数(IF AND)
- assembly - 为什么比较指令不起作用?
- install4j - install4j:如何替换标题横幅
- python - 使用 Python 模块 Glom,将不规则的嵌套列表提取为扁平的字典列表
- android - Android架构组件导航:工具栏后退按钮丢失,后退不起作用
- c# - 在 C# 中使用 Oracle 显示存储过程中的参数
- c# - 调整 DataGrid 大小后如何更新 DataGrid ScrollBar