问题
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