./gradlew: Permission denied #1378
-
I followed the information on the docs to build a native Android app. However, the builds are failing with the following information: /var/folders/w2/rrf5p87d1bbfyphxc7jdnyvh0000gn/T/build_script_4_1_n_c79yad: line 10: ./gradlew: Permission denied
Build failed :|
Step 4 script `Build Android release` exited with status code 126 The script follows the examples provided by the CodeMagic docs site: - name: Build Android release
script: |
LATEST_GOOGLE_PLAY_BUILD_NUMBER=$(google-play get-latest-build-number --package-name "$PACKAGE_NAME")
if [ -z LATEST_BUILD_NUMBER ]; then
# fallback in case no build number was found from google play. Alternatively, you can `exit 1` to fail the build
UPDATED_BUILD_NUMBER=$BUILD_NUMBER
else
UPDATED_BUILD_NUMBER=$(($LATEST_GOOGLE_PLAY_BUILD_NUMBER + 1))
fi
./gradlew bundleRelease -PversionCode=$UPDATED_BUILD_NUMBER -PversionName=1.3.$UPDATED_BUILD_NUMBER Based on another question that I saw here, it seems that the problem could be the gradle version, as I am using 7.4.1, but it seems that the machines have the 7.3.1. Build Id: |
Beta Was this translation helpful? Give feedback.
Answered by
mohammedbabelly20
Feb 3, 2023
Replies: 1 comment 1 reply
-
Hey @Cussa, You need will add the execution permission to
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Cussa
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @Cussa,
You need will add the execution permission to
gradlew
before using it.So your script will look something like this: