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?
you don't need to have Gradle installed on your machine to build the project. the wrapper guarantees you'll be using the version of Gradle required by the project. you can easily update the project to a newer version of Gradle, and push those changes to version control so other team members use the newer version.
To run a Gradle command, open a command window on the project folder and enter the Gradle command. Gradle commands look like this: On Windows: gradlew <task1> <task2> … e.g. gradlew clean allTests.
Overview. Gradle is commonly used by developers to manage their project's build lifecycle. It's the default choice of build tool for all new Android projects.
You can execute all the build tasks available to your Android project using the Gradle wrapper command line tool. It's available as a batch file for Windows ( gradlew. bat ) and a shell script for Linux and Mac ( gradlew.sh ), and it's accessible from the root of each project you create with Android Studio.
Try to set the execution flag on your gradlew file:
chmod +x gradlew
Could also be fixed with
git update-index --chmod=+x gradlew
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With