运行flutter项目时出错,没有权限 [英] Error in running flutter project which no permission
问题描述
在调试模式下为x86构建的Android SDK上启动lib/main.dart ...
Launching lib/main.dart on Android SDK built for x86 in debug mode...
[!] Gradle没有执行权限. 您应将项目目录的所有权更改为您的用户,或将项目移至具有执行权限的目录. Gradle任务assembleDebug失败,退出代码为1 退出(sigterm)
[!] Gradle does not have execution permission. You should change the ownership of the project directory to your user, or move the project to a directory with execute permissions. Gradle task assembleDebug failed with exit code 1 Exited (sigterm)
推荐答案
我在尝试在Mac上执行flutter run
时遇到了同样的错误.显然,在您的Flutter项目中,有一个文件android/gradlew
应该可以执行(不是).所以就我而言,我跑了...
I got the same error trying to execute flutter run
on a mac. Apparently, in your flutter project, there is a file android/gradlew
that is expected to be executable (and it wasn't). So in my case, I ran...
chmod a+rx android/gradlew
...随后flutter
命令起作用.
...afterwards the flutter
command worked.
这篇关于运行flutter项目时出错,没有权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!