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. This 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
      • Solution 4: Enable the execute permissions for the user

Either use:

      • chmod +x gradlew
      • chmod 777 gradlew



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.


Additional Resources



Android Orb:



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



Article is closed for comments.