./gradlew - No such file or directory

hello, i am a newbie to Android CI, I receive the error message “./gradlew - No such file or directory”. Could someone explain to me how to handle this? :slight_smile:

Hi @enyangxxx ,

You need to generate Wrapper in your project firstly, and make sure your repo has similar structure as below:

.
├── build.gradle
├── settings.gradle
├── gradle
│ └── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
└── gradlew.bat

Afterward, you can use ./gradlew script after code checkout. You need to add permission for gradle commands.

- name: Make gradlew executable
      run: chmod +x ./gradlew
    - name: Build with Gradle
      run: ./gradlew build

Please refer to the link here and doc here for the details.

BTW, there is a sample repo here for your reference.

Hope it helps!

I also have the same problem, please tell me if it is solved

See @weide-zhou’s reply above, or provide a link to your repo so that we can try to help. So far you haven’t given any detail with which someone might try to debug the issue you’re encountering.

1 Like