How to fix zsh: permission denied when running Gradle commands on Android Studio Terminal on MacOS

Viewed 6794

I can not run any Gradle command (for example ./gradlew build) on Android Studio Terminal. Every time I get zsh: permission denied.

How can I fix it?

2 Answers

If you get zsh: permission denied you need to run chmod 755 gradlew first and you'll get rid of the error.

Try to set the execution flag on your gradlew file:

chmod +x gradlew

Related