gradlew: Permission Denied

Brenda Nicole Tan picture Brenda Nicole Tan · Jul 16, 2013 · Viewed 189.3k times · Source

I am attempting to run gradlew from my command line, but am constantly facing the following error.

Brendas-MacBook-Pro:appx_android brendalogy$ ./gradlew compileDebug --stacktrace
-bash: ./gradlew: Permission denied

I am already running this command from my project directory. Need to run this command as I am facing the same (nondescriptive) error on Android Studio 0.2.x as encountered here: Android studio and gradle build error

Am I doing something wrong and how do I get around this?

Answer

Vincent Cantin picture Vincent Cantin · Jul 16, 2013

Try to set the execution flag on your gradlew file:

chmod +x gradlew