build task failed: exec: "gradlew": executable file not found in $PATH
Closed this issue · 6 comments
Our builds fail in version 1.0.3.
An excerpt from logs:
Run build:
$ gradlew ":app:bundleMainRelease"
Run: build task failed: exec: "gradlew": executable file not found in $PATH
The same line in logs before 1.0.3 (no error, working as expected):
Run build:
$ /bitrise/src/gradlew ":app:bundleMainRelease"
all builds are failing :)
Can someone share the entire step's build log? I have trouble reproducing the failure, it works with the following step inputs:
+------------------------------------------------------------------------------+
| (4) android-build@1 |
+------------------------------------------------------------------------------+
| id: android-build |
| version: 1.0.3 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2022-07-14T15:33:29Z |
+------------------------------------------------------------------------------+
| |
Input:
- ProjectLocation: /bitrise/src
- AppPathPattern: */build/outputs/apk/*.apk
*/build/outputs/bundle/*.aab
- Variant: debug
- Module: app
- BuildType: apk
- Arguments:
- CacheLevel: only_deps
- DeployDir: /bitrise/deploy
Run build:
$ /bitrise/src/gradlew ":app:assembleDebug"
output of build step:
| (3) android-build@1 |
+------------------------------------------------------------------------------+
| id: android-build |
| version: 1.0.3 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2022-07-14T15:28:39Z |
+------------------------------------------------------------------------------+
| |
Input:
- ProjectLocation: src-capacitor/android/
- AppPathPattern: */build/outputs/apk/*.apk
*/build/outputs/bundle/*.aab
- Variant: debug
- Module: app
- BuildType: apk
- Arguments:
- CacheLevel: only_deps
- DeployDir: /bitrise/deploy
Run build:
$ src-capacitor/android/gradlew ":app:assembleDebug"
Run: build task failed: fork/exec src-capacitor/android/gradlew: no such file or directory
| |
+---+---------------------------------------------------------------+----------+
| x | android-build@1 (exit code: 1) | 1.29 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...thub.com/bitrise-steplib/bitrise-step-android-build/issues |
| Source: https://github.com/bitrise-steplib/bitrise-step-android-build
good luck
Seeing the same
+------------------------------------------------------------------------------+
| (6) android-build@1 |
+------------------------------------------------------------------------------+
| id: android-build |
| version: 1.0.3 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2022-07-14T15:05:29Z |
+------------------------------------------------------------------------------+
| |
Input:
- ProjectLocation: android
- AppPathPattern: */build/outputs/apk/*.apk
*/build/outputs/bundle/*.aab
- Variant: release
- Module: app
- BuildType: aab
- Arguments:
- CacheLevel: only_deps
- DeployDir: /bitrise/deploy
Run build:
$ android/gradlew ":app:bundleRelease"
Run: build task failed: fork/exec android/gradlew: no such file or directory
| |
Does anyone know how to downgrade this version with bitrises UI if you don't use a bitrise.yml file?
This is as close as I can get, but it doesn't help as this is a patch version change. Thanks
Figured out the bitrise yml location on the web. Just need to amend the version now...
I changed:
- android-build@1:
to:
- android-build@1.0.2:
Build is back up and running. Will revert this after a fix is published. But for now this might help people :)
Sorry for the inconvenience, a hotfix is coming soon! In the meantime, you can work around this by settings the project_location
input to an absolute path, such as $BITRISE_SOURCE_DIR/android
(or downgrade the step to version 1.0.2)
Once again we are sorry for the inconvenience this caused, the fix is released as version 1.0.4.