Error in running flutter project which no permission

南楼画角 提交于 2020-06-11 01:03:10

问题


Launching lib/main.dart on Android SDK built for x86 in debug mode...

[!] 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)


回答1:


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

...afterwards the flutter command worked.




回答2:


Try to set the execution flag on your gradlew file:

chmod +x gradlew



回答3:


chmod a+rx android/gradlew

This works but for windows you need to install "Git for Windows"



来源:https://stackoverflow.com/questions/58901828/error-in-running-flutter-project-which-no-permission

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!