When I try building android project, build fails with the following msg:
Started by user admin
Building in workspace /Users/Shared/Jenkins/Home/workspace/stable-dev
[Gradle] - Launching build.
FATAL: The Gradle wrapper has not been found in these directories:
/Users/admin/Downloads/android_stable_dev,
/Users/Shared/Jenkins/Home/workspace/stable-dev
Build step 'Invoke Gradle script' marked build as failure
Finished: FAILURE
Configurations I used:
Use Gradle Wrapper
build File: /Users/admin/Downloads/android_stable_dev/build.gradle
I tried filling /Users/admin/Downloads/android_stable_dev/gradlew
, /Users/admin/Downloads/android_stable_dev/gradle/wrapper/
, /Users/admin/Downloads/android_stable_dev/gradle/
etc. in the Wrapper location
field in the configuration. Still didn't work (All those files are there).
I'm using jenkins-2.47.pkg
You only have to provide the location of parent folder of the gradlew and build.gradle and not the files. So in your case
Root Build script: /Users/admin/Downloads/android_stable_dev
Wrapper Location: /Users/admin/Downloads/android_stable_dev
It is mentioned in the help (click ? next to Wrapper Location and Root Build script options) but I too found this out after carefully reading it multiple times
If you are not getting the correct file path in Jenkins of your gradle wrapper, you can set this using cd command and run the specific task like below.
cd ${WORKSPACE}/Android/YOUR_CODE_FOLDER
./gradlew clean assembleDebug
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With