Troubleshooting "/bin/bash: line 2: ./gradlew: No such file or directory


When running ./gradlew you may find that the command is not able to run which is because the ./gradlew file will be part of your VCS commit so you will need to either set the directory or define it within the command.


  • Solution 1 - cd to the directory containing ./gradlew

    • - checkout
    • cd ~/project
  • Solution 2 set the working directory to the directory containing ./gradlew

    • working_directory: ~/project
  • Solution 3 define the full directory containing ./gradlew

    • ~/project/gradlew assembleDebugAndroidTest

This will allow you to use the gradlew file and you will no longer see the issue.

If you do please make sure that you have included the file within the top level of your VCS.

Was this article helpful?
0 out of 0 found this helpful



Article is closed for comments.